Akimbo
Filament V3 not working with s3 and image column
I have made an image column that I am uploading to s3.
The upload works when I am initially creating a form, I can see the image in s3. But when I go to save the resource, the column fails with validation "The school Logo field must be a file of type: image/*". This is despite successfully saving it to s3. I am uploading a png.
Here is the form and table column.
11 replies
In resources, where do I put database queries that I only want to run once?
The
->hidden()
method runs 5 times per row in my app, and that seems to be the default with filament. I really need the result of it to be based on a user permission, but that would mean fetching that permission lots of times when I don't need it.
Is there a place in a resource similar to mount
where I can load something once and access it?10 replies
Can't add scripts to admin panel service provider
I tried adding the scripts as indicated here, but it doesn't appear on any part of the filament admin app.
For context, I am on a Laravel 11 app that uses Volt. But the file is still just a JS file sitting in that resources folder.
https://filamentphp.com/docs/3.x/support/assets#registering-javascript-files
31 replies
How do you call methods with a Custom Column?
I have been able to make a custom column, but I have been trying to figure out how to actually call methods.
If I try to use it like a volt component, it is not able to to see volt functions Clicking here will give "toggleLiveStatus undefined"
Methods defined in the custom class itself will also don't register.
I really am just trying to make a callback for clicking on the columns button.
8 replies
No way to add sideeffects to ToggleColumn?
I am making an admin panel to interact with another API. When the user toggles a ToggleColumn switch, I want to conditionally allow the state change depending on the API.
Unfortunately I can't get any kind of conditional state change on ToggleColumn. I have tried updating the event after state is updated.
I have tried updateStateUsing, which doesn't seem to update the state as far as I can tell.
9 replies