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
3mos 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 liked a comment+100 XP
5mos ago