ChesterS
Register Filepond Plugin
I wanted to enable the plugin that allows renaming of file uploads (https://pqina.nl/filepond/docs/api/plugins/file-rename/)
15 replies
Livewire / Custom Page issue / skipRender not functioning?
What exactly are you trying to achieve here? Do you want to just change the color of the icon or do you want to persist something in the database?
If all you want is to change the color of the icon, you don't need any Livewire calls, just use JS.
My guess is that you want to save the user's favourites in the DB. In that case, I would double-check the rest of the code because it looks like there are some bugs somewhere.
1) Make sure the original state is populated correctly in your template
2) Make sure your changes are saved in the database as expected
With the code samples you provided, we can't help you much.
Either way, you can try the
#[Renderless]
attribute on that method, see if that works.4 replies
Form trying to update a field that is not in the form
I'm ... still not sure what you mean? :/ I don't use it anywhere in the form - it's a field that exists on the model
I just created a trait for it because I also use the same login logic in other models
17 replies
Form trying to update a field that is not in the form
There's not much to share TBH. Here is the schema
But I think the issue might be related to the alert field. It's included through a trait like this
I still don't understand why it would try to save it if it's not in the form or if there's a workaround for it
17 replies
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