silveira started a new conversation+100 XP
3mos ago
after i update my project to livewire 4 i am getting this error when i am trying run some action in my component.
I am using filament v5 table and his action
here is my code
//... existing code
->recordActions([
Action::make('delete')
->label('Excluir')
->icon('heroicon-o-trash')
->color('danger')
->requiresConfirmation()
->action(fn (Inventory $inventory): bool|null => $inventory->delete()),
])
my view
<section class="container mx-auto p-4">
<x-heading
:heading="__('Inventory')"
:subheading="__('Manage your inventory items')"
/>
{{ $this->table }}
</section>
silveira liked a comment+100 XP
4mos ago
I just resolved it per method injection for example:
public function create(ICourseRepository $_course)
{
$this->reset(); // Reset all fields
$this->categories = $_courses->allCategories(); // Fetch all categories
$this->dispatch('openCourseModal', ['title' => 'কোর্স যোগ করুন']); // Dispatch an event to open the modal
}
Just like that, It works for me. Thank you everyone for allowing me some of your valuable time.
silveira wrote a reply+100 XP
4mos ago
still works
silveira liked a comment+100 XP
4mos ago
Answering my own question, in case other's are looking for this.
/** @return BelongsTo<Programme, $this> */
public function programme(): BelongsTo
{
return $this->belongsTo(Programme::class);
}
It works with Larastan 3.0.0
silveira wrote a reply+100 XP
4mos ago
i add this helper function
silveira wrote a reply+100 XP
4mos ago
do you found some fix for this? i am using vscode and te have same error