Filament

F

Filament

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

Join

Create admin user with different role in admin panel

Can anyone help please I need create admin users in admin panel also need different role for them How I can do it ?...

How can I ensure that only the user's data is exported?

There is a problem with other user data being downloaded. Only the data that really belongs to the user should be downloaded. How can I ensure this? Here is my Exporter Class ```...

Form Select - Search Across Relationship

I have 3 resources. - OfficeResource (Model: Office) - OfficeAddressResource (Model: OfficeAddress) - CountryResource (Model: Country) ...
Solution:
Modify the return options?
->getSearchResultsUsing(fn (string $search): array => OfficeAddress::where('street_address', 'like', "%{$search}%")->orWhere('city', 'like', "%{$search}%")->limit(50)->pluck('name', 'id')->toArray())
->getSearchResultsUsing(fn (string $search): array => OfficeAddress::where('street_address', 'like', "%{$search}%")->orWhere('city', 'like', "%{$search}%")->limit(50)->pluck('name', 'id')->toArray())
...

Completed Wizard step

We are are building a very custom import of an XLSX file which is not possible with a pre-built Import action. In the first step, the file gets selected and uploaded. In the second step, the file gets imported....
Solution:
Here's my final schema. I used afterValidation in the end. ``` ->schema([ Wizard::make([...

Sorting ignores relation condition

Hi, I have been trying to get this to work but im stuck. Basically i got a relation on my record called 'animals' and on the table i need to have several counts of this object with different conditions, like so:...

Infolist, Actions in Section\Tab Headers

Hi, Anyone know of a way to get any actions into section\tab components within infolists. I want to be able to open up edit modals on specific areas of a large info list, so users can edit just that part. Using hintAction etc works fine, but I want the button in a section or tab head:...
No description

Is there an easy way to group dashboard widgets into tabs?

Hey team, just wondering if there is an easy way to group widgets into tabs on the default dashboard? Or is it more a 'go set up your own'? Example: ```swift Tab1 name="Overview": ...

I can't get the submit button to show on a Filament-livewire form

Submit button on create action not showing My Form Modal does not show a submit button ```<?php ...
No description

Hi, does anyone know how to add a break-line in StatsOverview Widget?

in the ->description() ```php Stat::make('User Analytics', $totalUsers) ->description(...
Solution:
oh... try like this ->description(new HtmlString('Active<br>Inactive'))

What is the Best Way to Encrypt a FilamentPHP Project for Local Deployment?

Hello everyone, I have a FilamentPHP project built with Laravel, and I want to protect the source code from being altered or viewed when deploying it locally (for example, using Laragon or other local servers). I’m exploring the best method to encrypt or obfuscate the code to prevent unauthorized access, but still allow the project to run without issues. I’ve come across a few options like phpBolt, ionCube, and PHP Obfuscators, but I’m looking for advice from anyone who has successfully implemented encryption or obfuscation in a Laravel-based project, particularly for Filament....

widget

hey guys i want to create a dashboard. When i try to load 4 stats as colspan:12 and 1 chart as colspan:8 and 1 more stat after chart as colspan:4 they are not matching as the screenshot shows. Have a nice day!...
No description

Does a Toggle blade component exist?

I want to use it in my View::make but i didn't found on the documentation of Core Concepts -> Blade Components, if not possible where can i get the styling and js so i can cannibalize it?

Create and Edit Users Custom input

In the createUsers form, the password field is mandatory, I want the mandatory field to disappear in editUsers.

register page

I want to register with my phone number and receive a code in a message. When I verify the code, I can register. Is it possible?

Working form field on ViewRecord?

I have an Input form at the top of the long form that i use for search for input fields. Works great on edit, but on viewrecord, its disabled. Is there a way not to disable this single input field on ViewRecord? Its set to dyhydrated(false) anyway, so its never used for actual saving anything.

Allow only users with specific roles to access the login.

Hi, I'm in a filament project with FilamentShield plugin. I have two panels, one for admin and one for a regular user. The admin has the super_admin role and the user has the user role. It is worth mentioning that the project has other roles. How do I so that, on the /admin route, only the super_admin can log in and that too on the /user route. How can I prevent other users with different roles from logging in? Plugin: FilamentShield.

Livewire component in blade template

i have a livewire component table made following the documentation in this link: https://filamentphp.com/docs/3.x/tables/adding-a-table-to-a-livewire-component now i need to add this table or component in a blade file: ```php...

Repeater Item Loss in Filament Resource with SpatieMediaLibraryFileUpload

What I am trying to do: I'm attempting to implement a repeater in my Filament resource that allows adding multiple construction progress images with associated metadata. Each item should be saved to the disk and have an entry in the Spatie media library table. What I did: Set up a Repeater field in my DevelopmentResource with SpatieMediaLibraryFileUpload and other form components....
No description

select filter lazy loading

How to add lazy loading to the select filter on table? Something like this if available ``` SelectFilter::make('status') ->paginate(10)...

Reorderable button does not update automatically {hide/show} when the condition argument changes

I have this code in my resource class ``` public static function table(Table $table): Table {...