Filament

F

Filament

Filament is a collection of beautiful full-stack components for Laravel.You can get help using it on our Discord.

Join

How to use Markdown Editor / Richeditor in a Blade file?

How can I use the markdown editor / richeditor in my custom view page?

Verify email before check subscription

I created a middleware to check if a user's subscription (Cashier) is active. However, I have a problem: the subscription check is performed before the email verification check. How can I solve this? Thanks!...

Remember me button in login

i need to remove the Remember me button how can i do this

How can I change the default login page route in Filament?

I'm trying to customize the login route to /admin-login instead of /login. However, after trying to access an unauthorized page, it redirects me to the default /login instead of the /admin-login route I created. How can I configure this correctly without breaking Filament's authentication? Any help would be appreciated

The POST method is not supported for route admin/login for custom login page

Hello, I have an issue with a custom login page in Laravel 11 with Filament 3. When I submit the form, I get the error: "The POST method is not supported for route admin/login. Supported methods: GET, HEAD." ...

wire:loading Not Triggering During Action Dispatch in Filament

I'm having trouble getting the wire:loading indicator to show when dispatching an event from a Filament action. The action works, but the loading spinner doesn’t appear. Here's the code I'm using: ` Tables\Actions\Action::make('test') ->dispatch('triggerPrint', ['action' => 'print', 'element' => 1]),...

table layout styling

So whenever I implement layout functionality such as Split or stack. The entire table just keels over. ```php ->columns([ Tables\Columns\TextColumn::make('id')...
No description

How do you dispatch an event inside a custom page that isn't blocking with defer?

defer(function(){ $this->dispatch('customer-synced', '5XY7BSBN88S60'); }); When the dispatch isn't wrapped in a defer it works but it blocks....

How to pass some data to my custom view(livewire component) in filament table action?

Hi, This is my filament table action. ``` Action::make('setting')...

How do I make text based boolean columns

If i have a boolean column that I would want to display as text instead of an icon, ->boolean doesnt exist on TEXTCOLUMN This example the column references 'is_book' where a false value would mean it is a magazine instead of a book. So I'd like the column labeled "type" to display either 'book', or 'magazine' depending on true or false....

Fileupload: How to show a default image that the user can override with their own image

Basically I want to show a default image in the file upload form that the users can choose to replace by uploading their own image. Couldn't find an easy way to do this in the docs (but I think I am probably missing something) Thanks.

Don't want Create Form to show if No Subscription

I want to show No Subscription notification without showing Create Form when user clicks on Create button in List Page. I have this in create page. I also tried beforeFill but halt gives error. ``` protected function handleRecordCreation(array $data): Model { $data['reference'] = RandomStringGeneratorService::generateRandomString(); $data['member_id'] = Auth::user()->member->id; ...
Solution:
I created custom create action listpage. ``` protected function getHeaderActions(): array { return [ Actions\Action::make('create') ->label('Create Job Seeking Post')...

How can I add a client side error message to FileUpload?

When uploading a file that is either not the correct file type, or larger than 2 megabytes, the light gray "x" icon jiggles, but I'd like to add a client side error message as to why the error occurred. It seems that `->validationMessages()" does not do this. How can I add friednly messages specific to each validation? ```php FileUpload::make('image') ->maxSize(2048)...

Disable editing in table row

Hello everyone. I have a condition that disables the editing method of a record. It is working fine, but I noticed that if I click on other columns in the row it edits normally. Is there a way to disable this editing in the row where editing is disabled? Thanks.

how do you test `extraModalActions`?

example code of table (it works fine in UI). ```php ->actions([ EditAction::make('edit-post') ->iconButton()...
Solution:
solution ```php Livewire::test(ListPost::class) ->loadTable() ->mountTableAction(['edit-post', 'delete-post'], $post)...

Automatically delete Export files

Hi guys! I've started playing around with the Exporter functionality in Filament. Works great in combination with Digital Ocean spaces. I'm wondering how to auto-delete the files from DO after a while, since I don't want to keep them there forever. Anyone struggled with that before?...
Solution:
Just create a scheduled task that grabs the files checks their dates and delete them if they are old enough.

How to organize a data import module in my SAAS that respects dependencies between records?

Hello friends, I hope you are well! I tell you that now in my SAAS I am working on the data loading part of my clients, this stage is or should be the initial one so that when I start using the SAAS, I have all the data entered in the different modules, I had worked a certain part where I added some import and export buttons but I think that for usability and precision it is much better to have a module or section exclusively for importing data... So my question is if I can place a cluster within another cluster, since I think it would be interesting to be able to place another cluster in configuration that allows importing each registration of the system modules that are required, for example having a subcluster to import EntrustRegistration with the button for import and export the demo for excel, other cluster to import VisitRegistration, other cluster to import PropfIncome and so on, is this an idea that occurs to me at the moment... or do you suggest a simpler idea to cover this section?...
No description

Component to return a json

Is there any component or any way to create a custom one that allows you to group its elements into an array or object, just like the Builder component does?

Limit form edit using role but can make a new form through the getRelation()

I wanna ask how can I limit certain role for editing the forms, but i wanna make sure all roles can make a new form through the getRelation(), thank you guys
No description

Eloquent query using integers not working in Filament context

When using a custom query builder/scope with a scope like this: ``` public function inProject(int $projectId): self {...