Davide Cariola
Table Filter for Repeater Json Column
The error was caused by my test data: by using
json_encode
in the factory code, together with casting, the json was saved with the ""
.
Maybe it can be useful in the future for someone with a problem similar to mine 🥲6 replies
custom select componenet with phone code , and country emoji
If I understood correctly what you need, you can use this:
https://filamentphp.com/plugins/ysfkaya-phone-input
4 replies
Filter's query returns collection but table stays empty
Here is my code:
Am I doing something wrong? Do you have any other ways to solve this? All I would need is for the table to display all the records once the input has been emptied of the maximum price.
4 replies
How to check if filename uploaded, already exists?
If you're preserving the original filenames, you could use
->rules()
and then write a Closure which checks the name of the files in the storage.
In the closure you could use Storage::disk('your_disk')->exists('file.ext');
Before doing that, read this:
https://filamentphp.com/docs/3.x/forms/fields/file-upload#security-implications-of-controlling-file-names
there are several security implications for why you don't want to preserve original filenames.
Good coding! 😄3 replies
Go to different step based on field value
I managed somehow but the UX is not the best.
I persisted the step in the query string and I used this:
but you'll see the redirecting, which is unfortunate.
Maybe someone has some ideas to start from here and make it smoother?
3 replies
Hide create button in a form with wizard
Hi @Vp, got it in the morning. The problem was that I was using the method in the wrong place 😄
Thank you so much for the tip.
For others:
this hides every button except the one you choose to show (you can find the methods in the CreateRecord class
6 replies
Repeater MorphToMany
Then in my PermissionResource I have:
But when I try to save I get this error:
SQLSTATE[HY000]: General error: 1364 Field 'grantable_type' doesn't have a default value
which I think it means that it cannot manage the grantable_type column with the path to the model.
Any idea how to solve? Thanks everyone2 replies