ChesterS
Use HeaderAction to upload file in FileUpload.
Not sure what you're trying to do, but you can use the
saveUploadedFileUsing
method.
If you want to handle the file creation manually, you can set storeFiles(false)
in the fileupload, and then get the raw state and do w/e you want
hope it helps4 replies
canAccess function generate a lot of duplicate queries
Is this in a table or a list of sorts? You might need to refactor how you check what people can see in that page - instead of checking if they have access to each event one-by-one, maybe only show the events they do have access to and skip the
Depends o what you're trying to achieve. Also, your query can be improved. Some other improvements can probably be made, but I've never used tenancies.
canAccess()
check entirely?
Or maybe eager-load the event contestants and use a different policy?Depends o what you're trying to achieve. Also, your query can be improved. Some other improvements can probably be made, but I've never used tenancies.
5 replies
How to move CreateAction inside HeaderActions
There's no build-in method AFAIK.
You can try with css or something, or maybe render hooks.
https://filamentphp.com/docs/3.x/support/render-hooks
5 replies
How to use a custom path with spatie media library plugin?
Spatie has a per-model path generator AFAIK. In the config there's the following section
I haven't used it but I assume you can define a custom path generator based on the related model that the media is linked to.
13 replies