Filament

F

Filament

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

Join

WorkOS integration with Laravel 12 and Filament?

Has anyone used the new WorkOS integration with Laravel 12 and Filament? Any ideas as to how that auth flow would be setup?

how to communicate with Nextcloud to upload files or images ?

How to use file upload with custom action or upload files in Nextcloud using file upload and get files and view separate page ?

Has anyone successfully parsed the rich editor/trix field from the raw data in the database?

I have an application that has used the trix editor for a while. I need to migrate this data to a new application that also uses the trix editor for the same field but the difference in this new application is that it doesn't allow file uploads in the field like the old application did. Wondering what the best way would be to rip those files out of the body of that field and upload them properly for the record. Anyone have any experience here?...
Solution:
trix is just json no? So write a migrator, parse the data get the files, download them to a folder structure, then migrate accordingly? Simple laravel console command/

column data in exporter

this is the code. ```ExportColumn::make('data')->label('Data') ->formatStateUsing(function ($state) { // Debug log the incoming state...

Expand infolist to full width in livewire component

I've created a custom simplepage that has a livewire component that displays an infolist. It will be viewed as a wallboard with no login. All appears to work, however the infolist appears in a small box centered vertically and horizontally. How can I make the infolist expand to take up the full page? ...
Solution:
public function getMaxWidth(): MaxWidth { return MaxWidth::Full; }...

Route [login] not defined

please help! I have two guard and I use admin guard for Filament admin, and I use export action in header or bluck action, after success, in notification when click to open download file like .csv, redirect me to Route [login] not defined. how I can solve it?...
No description

Change the size of RelationManager's create/edit modal?

I have a RelationManager created to manage Product assets. I've done my form with ID (hidden), name, type, file and is_primary (bool). I've arranged the form to 1 column, but I'd like to change modal width so the fields don't show so long. When talking about Actions, you can change the width of the modal by using the modalWidth() method. Is this posible in a RelationManager's create/edit modal?...
Solution:
Yes. Those modals are just actions, too. You should be able to add this to the Edit and CreateAction

extraModalFooterActions not working

What I want to do is customise what happens in the 'Cancel' action of a modal, but I can't find a way to do this. Here is what I've tried so far ```php TextInput::make('foobar') ->required()...

format minutes as hours in form, and save back to database as minutes.

Hi guys, - im not sure what im doing wrong. I store planned_time in minutes in the db. I want the filament form to show in hours, and save back to the db in minutes. Here is my current code. I can either get it to save, or to show on the form properly, but not both. what am I doing wrong?...

Change chart type according to the selected filter

in my chart widget i'm using this code to change the chart type according to the selected filter but it doesnt work, any idea ? `` protected function getType(): string { return $this->filter == 'date' ? 'line' : 'bar';...

Can't close modal from custom cancel action

I have the following field with a suffix action ```php TextInput::make('search') ->suffixAction(Action::make('foo') ->modalCancelAction(...

Discover the Filament resource at new path

``` foreach ($this->getModulePaths() as $module) { $panel->discoverResources(in: $module['path'], for: $module['namespace']); } ...

stats layout on a dashboard

I've followed the docs for both the dashboard page and the widgets. But still currently are displaying vertically. This is my overridden dashboard ```php class Dashboard extends \Filament\Pages\Dashboard...
No description

search field width

What is the best way to make the search field above the table full width? It is very narrow by default and it just looks odd on desktop? I do understand the mobile aspect, but for desktop it just looks unporportional.
No description

How to Refresh Filament Select Field in Real-Time When New Records Are Added?

Hey everyone! 👋 I have a Select field in Filament, which loads data from the database. However, I noticed an issue: When a user opens the select dropdown, it preloads the data....

error Undefined variable $livewire after upgrading filament and livewire

after upgrading filament and livewire, why i got error Undefined variable $livewire pointing in storage/framework/views blade file I've followed the upgrading steps in livewire and i've run artisan view:clear...

Change navigation icon size

Is there a way to change navigation item icon size? I'm using the FontAwesome's icon set and the default Tailwind w-6 classes for the sidebar's item icons are quite large for me. Instead I'd like to use w-5 so the icons are represented in a more compact look....
Solution:
I think you would have to do this with a custom theme and css.

Any reason TextInput doesn't use CanFixIndistinctState?

creating and using the following class works in my limited testing, wondered if there was a reason? ``` class NewTextInput extends TextInput { use CanFixIndistinctState;...

How to get current tenant in FilamentServiceProvider?

Hi guys, I want to dynamicaly set some NavigationItems based on current tenant. So I need to register them in service provider, but I am not sure, how to access current tenant, becuase this is not working: ```php public function panel(Panel $panel): Panel { $stores = Filament::getTenant()->stores;...