Povilas K
FileUpload file validation after upload, before submit
Our article about it: https://laraveldaily.com/post/filament-validate-one-form-field-live-before-submit from 2023 so double check if still works
5 replies
Building own "resource" to run within the Filament UI
Well, I used AI only to provide a quick answer with the IDEA on how you should go, not for literal copy-pasting the answer, so of course, you need to double-check, and that's why AI generators and assistants won't replace devs anytime soon, because in 99% cases some modifications are needed anyway, so devs need to understand how it works.
But something for me to think about for the future: probably on this Discord and forums it's dangerous/harmful to just give the answer from AI, as most people seem to be not experienced enough to process it.
That said, maybe sometimes it's better to provide this answer than no answer at all, as reproducing the situation for me and providing the working code would take an hour or two (which I don't have as free time).
10 replies
Is It Possible to Use a Single Login URL for All Roles in Filament Shield?
Mmmm yeah, that may be a good point, in our tutorial we don't use Shield, so maybe that plugin adds extra check for the panel if it doesn't allow you to log in. Sorry, from here I can't help much without debugging your full code and experimenting with it.
28 replies
Is It Possible to Use a Single Login URL for All Roles in Filament Shield?
Weird then, the syntax is correct: https://laravel.com/docs/11.x/providers#the-bindings-and-singletons-properties
28 replies
Customer business logic into Login in Filament 3
Probably irrelevant for the author at this point but will post it for others to reference in the future, we published it as a free tutorial: https://filamentexamples.com/tutorial/login-extra-validation
7 replies
Spatie Media Library
@namrata quick update - wanted to play with the scenario but realized it would be too much time for me to even create such a project to reproduce that scenario. You probably don't want to share all the code, so please create a separate (public?) repo where I (or anyone else) would be able to reproduce and then debug the situation.
24 replies
Spatie Media Library
hmm, I thought you were pre-filling the CREATE form without any more data, so maybe that's different. Anyway I don't have a quick answer, would need to experiment in my free time how to autoload the image, I will get back to you if I have the answer later this week
24 replies
Spatie Media Library
I don't think you can "fill" the upload automatically for the user filling the form, at least I haven't done it.
What I would do instead is show the IMAGE like img tag visually and place its value as default in a HIDDEN field of HTML, or a value in Livewire component.
And if someone uploads some OTHER file instead, then saving would take that new file, otherwise take the URL from default hidden file, and if needed copy that file into your storage which would give a new local URL.
24 replies
Is It Possible to Use a Single Login URL for All Roles in Filament Shield?
We have a tutorial about it: https://filamentexamples.com/tutorial/multiple-panels-sign-in-via-one-sign-in-page
28 replies
Building own "resource" to run within the Filament UI
@jjo63 As an experiment, I've put your question into Claude AI and it gave me pretty good answer, pasting it below. Haven't tried it myself but the direction seems pretty good.
The general idea is that any custom page in Filament is a Livewire component, so in the Blade file you use things like
wire:submit="search"
Also as you want to use Filament UI you need to use Filament components such as <x-filament::button type="submit" class="mt-4">
10 replies