Filament

F

Filament

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

Join

Badge count on relation manager tabs

Hi all, is it possible to get a count of all the records in the relation manager tab badge?
Solution:
in the relation manager ```php public static function getBadge(Model $ownerRecord, string $pageClass): ?string {...
No description

Having to click action button twice for changes to take place

I have this Button and on click I want to change pdf template Actions\Action::make('test_smthng') ->label('Change PDF preview') ->action(fn () => $this->selectedView = 'pdf-templates.layout.pdf-preview-default')...

Add logout navigationItem to sidebar

Hello ! I'm trying to add a navigation item on my sidebar to logout, I made this in my panel : ```->navigationItems([ NavigationItem::make('Déconnexion') ->url('/logout')...

Form in view record

In my Intervention resource, which displays the details of a client's intervention, I want to add a form that allows users to add activities related to this intervention. This form should contain a simple textarea field and be displayed directly on the intervention's view page (which extends ViewRecord). Additionally, the activities that have been added should also be displayed on the same page, below the form. How can I achieve this in Filament and Laravel?...

Create resource for email marketing

I'm almost finished with my SaaS project, and one of the things I'm including is the option to do email marketing. That is, to be able to create email campaigns and send them from a Filament resource. My question is if there is or do you recommend a way to do this, and where I can have an editor or preload a template with pre-made designs... I'm thinking about asking an AI like Claude or ChatGPT to create some templates for me, but I don't know how I could do it so they're editable and can be previewed by the user. Maybe my question is a bit confusing, but finally, any ideas or recommendations would be great. I want this part to be extremely easy for the end user as well, since the first image gives the option to customize or create something like that on the same page. And if I can make this easy for my client, it will be so much better... My idea is to make it as easy as possible for my client. I think I could set up some fixed fields using image, textarea, and text input types, and just change some predefined designs that I could add in the future. I could start with 3 or 4 but offer more designs to my clients later. This way I make my client's life much easier with email marketing....
No description

Combine more than one field in a Filament Resource recordTitleAttribute

Is there a way to call a function to instead reading just an attribute? So instead of protected static ?string $recordTitleAttribute = 'title; Using something like fn ($record) return "{$record->title} / {$record->subtitle}"...
Solution:
just override the getRecordTitleAttribute() method.

How To Add Next Button to the Form Tab

Hello, seeking for help. I want to add a Tab that have next and previus button then only in the second tab will save the data.

Markdown Toolbar Buttons

Are these all the available toolbar buttons for the markdown component, or just the default applied? Hoping for H2 and H3 heading tags. >"You may set the toolbar buttons for the editor using the toolbarButtons() method. The options shown here are the defaults:" ```php...

Trigger state format when reciving new state from afterStateUpdated with $set from another field?

If you have a field like this: `TextInput::make('price_to') ->live() ->label('Price To')...
Solution:
You could just extract the formatter to an str macro or helper function then you don’t have to repeat it. Also, iirc, formatStateUsing() only runs during the form initialization so it doesn’t run on updates through get / set which manipulates the livewire data directly....

I need help with bulkaction checkbox

``` class Storage extends Page implements HasForms, HasTable { public function form(Form $form): Form...

Livewire Starter Kit with Filament form and table builder package

Can we use Livewire Starter Kit and Filament packages together? I've tried a few times but couldn't succeed. Has anyone tried and succeeded?

The Notification icon has disappeared...

I recently installed FIlament on a new Laravel 12 project and the notification icon in the header isn't there anymore? Why was it removed? And how do I re-implement it? 😅
No description

How to change a column in users table after reseting password ? (like last_change_password) ?

Hi ! I made a Page for the first time connection of my users, and I have a date column set to null by default. I want to change this to the actual date when they submit the resetpassword form...

How implement visual differences DEV vs PROD?

Hi there, I'd like to have a subtle visual difference between environments - maybe just a different colour for navigation items - what's the simplest way to implement this? Many thanks!...

Header actions on "another" View page broken

What I did: I created another view page as outlined in the docs here: https://filamentphp.com/docs/3.x/panels/resources/viewing-records#creating-another-view-page php artisan make:filament-page ViewRequestApproval --resource=RequestResource --type=ViewRecord I also added actions to the page header as outlined in the docs here: https://filamentphp.com/docs/3.x/panels/pages#header-actions...
Solution:
I don't know what the exact cause was but php artisan filament:optimize-clear fixed the issue. Something must have been cached when setting up my local environment.

trigger action

Action::make('preview') ->label('プレビュー') ->icon('heroicon-o-eye') ->color('gray') ->extraModalWindowAttributes(['class' => 'upload_cover_image'])...
No description

Wrong connection if model and relationship from different connections

Base model from one db connection (not default) and relation (on select) from different db connection (default) -> edit/update model ->update query uses relationship db connection (default). Ofcourse, there is error -> undefined table...

MFA with Fortify and vormkracht10 2fa

I want to add MFA to my Filament app and I wanted to check my understanding was correct about how to proceed and that the packages I'm suggesting work together. We want App and Email codes. A future possibility of SMS would be nice. I have the standard out-the-box Filament login at the moment....

I don't understand how I can refresh a field

I want to use a HintAction on a field and refresh another. with a codebase like this : ```` ...

Integration with supbase/appwrite

Hello I was wondering how can I achieve the above ?