Filament

F

Filament

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

Join

Selecting and uploading a file via a modal window (file browser)

Hello everyone. I need a file field for a form. When I click the "Select" button, a modal window (file browser) will open with files already uploaded to the server. In this modal window, you can upload new ones, delete old ones, and select any for the current form. Are there ready-made plugins or solutions?...

Got error "Unable to find component" when click an action in relation page

Hello, i have an AssetResource, and i created a relation page ManageManagements for model asset, and i make a simple header action in this relation page, when i click it, i got error "Unable to find component: [app.filament.resources.asset-resource.pages.manage-managements]", i tried also action in table, get the same error, seems the action with modal just can not work here. Can someone help me, thanks very much!...
No description

Export download logs out with other auth guards and tenants

This route:-
filament/exports/{export}/download
filament/exports/{export}/download
...
Solution:
I've found it, need to override the filament.actions middleware, just added this to the app service provider and it all works perfectly now. ```php Route::middlewareGroup('filament.actions', [ 'web', 'auth:admin,organisation,associate',...

Is there a field lifecycle for delete in FileUpload?

currently my fileupload is set to upload real time and creates a Model record using a model called "File", the ->afterStateUpdated is working for doing it. Now my question is what the code for deleting a file? ``` FileUpload::make('files' ->reactive()...

Access Livewire component data inside Resource form

Hello guys! How can I access data from a livewire component inside a Resource Form? I need to access to the data and associate to the record while creating/editing. Do I have to rely on Events? ...

Fileupload field and Grid

Seems there is no way to control the number of columns and our upload form is full page and at full width, you can see that for some reason the background expands, but the image doesnt and you are left with thise huge boxes. I would rather have a max size on the image and have more columns or at least have the image expand with its preview box. Has anyone else ran into this isue and came up with a better solution?
No description

Remove All Filters button

Hi Guys, I have my table filters set up with a couple of toggle buttons, these contain basic options such as "This Month", "Year to Date", "Last Year", and "All dates" My problem comes in when the user clicks the "Remove All Filters" button at the top of the table. (It renders with a little x button in the top right once there are indicators present for the filters)...

Increase the font size of a badge TextColumn

Is there a way to increase the font size of the badge TextColumn: ``` Tables\Columns\TextColumn::make($key) ->searchable()->default('-')...

Need to refresh entire page to populate the rich editor field.

I needs to refresh the entire filament page in order to populate the rich editor field during create and edit operations. My resource form consist 3 rich editor field and i can only filled first one and need to refresh whole page inorder to filled all three . According to project requirement these rich editor fields are mandatory and must be filled in before the form can be submitted.

Render a Modal after Create

Is it possible to render a modal after creating a record in CreateResource? I tried Action::make, but didn't work ``` <?php ...
Solution:
I created a livewire component and redirected to it on redirectUrl() function

Stepsform + action after submit

Hey, I have a step form with an action to create a new post. I want to add a modal that verifies the post with a special code. All the code is in PostResource/Pages/CreatePost.php within the getSteps function. I'm trying to add a new getActions function and create an action within it, but the modal isn't displaying. How can this be done correctly?...

Form builder - Programmatically step with Wizard?

Good day, I have a two part question 1. Is there a way for me to programmatically go to the next step in the Wizard component? My last step is just a success page, I know I can use the "afterValidation" lifecycle hook to process a payment on that particular step, i then want to take the user to the last step (success page) once that is done. How can I do this?...

Insert import and export button here!

Hey guys, is there a hook position that allows me to insert 2 import and export buttons next to the create button? or failing that next to the table search button! I have added the import and export buttons in another module, but I stay above the search and to my taste it looks a bit ugly, I would like to see the option to place them next to create or search......
No description

Relation manager pulls wrong data

I have built a demo EHR system around medical records- I may not have architectured this correctly but i want to have appointments and prescriptions link so when a patient gets prescribed something its linked to an appointment, doctor, patient. i created PrescriptionsRelationManager which when i added to my ViewAppointment page it loads information about appointments rather than prescriptions?
No description

table filter with right-left navigation

is there a possible way to filter table data like the image below while using filament list record or resource class?
No description

PHP inside of HtmlString?

I am trying to include the domain within the HtmlString but its a modal from a table. So each modal has its only domain.
->modalDescription(new HtmlString('Paste your Username from <a href="'. $record->url .'">'. $record->name .' </a>\'s user page' ) )
->modalDescription(new HtmlString('Paste your Username from <a href="'. $record->url .'">'. $record->name .' </a>\'s user page' ) )
...
Solution:
->modalDescription(function($record) { return new HtmlString(); })
->modalDescription(function($record) { return new HtmlString(); })
...

Problem with ->unsavedChangesAlerts().

Guys, I'm using ->unsavedChangesAlerts(). I need it to work when I trigger an action that is in the EditResource. I made the action redirect to another page and it still didn't trigger ->unsavedChangesAlerts(). Any ideas what to do?

how to make tables compact

could we possibly make the tables a bit more compact? The row heights are quite large for just basic text, and it’s kind of limiting how many rows I can see on my desktop screen, I don't want all tables to be compact in case you thinking of applying global css values, but only some of them
Solution:
You’d still do it through css with a custom theme and to target specific tables each list resource has classes higher up the tree that can be used to target the table only on specific listing pages.