bakriawad
Filament Action in livewire component failing in a weird circumstance
I have created a custom livewire component, the component is sitting in a Filament page
the component has an action
the mount is empty, I call the action in the component
When I click the button, the form appears, all good here.
The issue is when I call for the data back from the database and set it in a variable in the component, then the framework tries to call the database to retrieve a model using it's ID, but that throws an error because the table doesn't have the ID column, it shouldn't be trying to do that at all to begin with.
I tried changing the naming, but nothing, still tries.
tried to call it in a separate function, still does that.
In short, if I add this:
then this happens:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ArrayTable.id' in 'where clause'
Why is trying to retrieve data on a custom action??? how to stop this?2 replies
Action modal in livewire component not working
I am having an issue displaying a modal in a livewire component using a Filament Action
I have followed the docs from:
https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component
This is how it looks like:
The component:
The button shows, on click it loads, but no modal appears
When I apply this same action in a Filament page it works and shows correctly, I am unsure to why this is...
14 replies
Custom import job
Getting a serializable error when trying to import using a custom job:
Cannot initialize readonly property Filament\Actions\Imports\Jobs\ImportCsv::$importer from scope App\Jobs\ImportPatients
(attached error message)
I am tryin to import patients, patients is a model that needs Users model to exists, where patient belongs to user
I have managed to create an import action, but that does not create the user with the patient, so I am resorting to creating an importer with a custom job
$table->headerActions([
ImportAction::make()
->importer(PatientImporter::class)
->job(ImportPatients::class)
])
I can't figure out what's wrong, and there is no duocumentation on this.24 replies