Filament

F

Filament

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

Join

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.

Displaying data from BelongsToMany relationship in UserRelationManager

I'm having trouble displaying the Role title in a UserRelationManager table column. Here’s the setup I currently have: Model: Account.php public function users() { return $this->belongsToMany(User::class, 'user_accounts', 'account_d', 'user_id', 'id', 'id')...

Lazy loaded tables and refresh()

I would really like the ability to lazy load table components I have in tabs on standalone livewire pages. But if I have a dispatch to refresh that component after an action happens and if it’s not currently loaded, I get the error ‘$table must not be accessed before initialization’. How can I more elegantly handle this in a simple way? Do I override refresh() in my tabs trait that does some checks first? Seems like livewire should handle this a bit more gracefully. Obviously it doesn’t need to...

Global Search Hooks

Hi all, Is there a way to "hook" searches? I want to transform some of the data before it hits the models for searching. As in, the user will be able to write their own query (e.g. `post:"example-post" AND hits:1337)). I'm going to transform that back to SQL using an API call....

How to use Spatie Translatable in filament custom page?

I have a page that is not a resource because there will be one record. But I don't know how to make LocalSwitcher work. I have tried everything possible that came to my mind. ```php class PrivacyPolicy extends Page implements HasForms, HasActions {...

Error in Full Calendar installation process

Hi guys. I'm trying to install Full Calendar and I get the following error when I try. λ composer require saade/filament-fullcalendar:^3.0...

Using multi-select does not working when using it inside an Action

Hello, I have a table header action with multi-select, when I choose multiple options and press submit, then after submit $data array is empty Any ideas how to debug this or what I am doing wrong? ```...
Solution:
It's because you have set it as a relationship, all relationships are removed from data.

Create itens by list

Hello, I would like to create some CheckboxList::make('any') based on an enum of modules. example of enum -> values ​​-> users, companies, roles. ...

Call table header action during test

How can i call a table header action during a test?

Bug? regarding clusters navigation

So I have some clusters assigned to some resources and when I override the canAccess and shouldRegisterNAvigation function in the cluster class. It disables the main cluster route but not the resources ones. The user can manually type the url and access it. Example: Cluster = Settings::class (url = /settings),...

open action depending on get parameter

Hello, I have a controller that create automatically a resource for a specific entity, then it redirect to the index resources pages. The goal is that the user click on a link in an email, it create the resource, redirect to the index page, AND open a specific custom action....