Filament

F

Filament

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

Join

How to set tags to a TagsInput using $set

Hello i would like some help to set tags using $set i have tried : ```php $set('tags', 'a,tag'); $set('tags', ['a','tag']);...
No description

searchable method makes columns all same width

How do I prevent bool values from taking up so much space? It's adding horizontal scroll to the table now because of this.
No description

Need help with DateTimePicker

I have this code in one of my resource inside employee panel: ```<?php
Forms\Components\DateTimePicker::make('check_in') ->label('Check-In') ->seconds(false)...
No description

All Tenants option

We have a many to many tenancy setup where one user can have multiple stores. Stores being the tenants. Using Filament we can have the tenant menu where the user can pick which store it wants to work in. The issue is that we also want a "All stores" option in the tenant menu. When in this option everything is scoped to ALL stores/tenants that the user has access to. What would be the best way to achieve this in Filament? Any help is appreciated....

Add styling to heading ?

Is it possible to 'somehow' add styling to the heading ? Using the minimal theme it's hard to read & differentiate ... Seems ExtraAttributes doesn't do anything either...
Solution:
->heading(new HtmlString('<span class="text-blue-500">Identité</span>'))
->heading(new HtmlString('<span class="text-blue-500">Identité</span>'))
you should also update your content configuration in tailwind.config.js to scan for classes inside your directory as './app/Filament/**/*.php', etc...
No description

Change the URL path of the Navbar in the Admin Panel

Hello everyone, I'm Attan. I would like to ask how to change the URL path for the navbar in the admin panel. Thank you....

Uploading File Gives [Method Not Allowed] error when uploaded via filepond

I am getting the following error when try to upload files via Filament. The GET method is not supported when for route Livewire/upload-file. I am working on it locally at the moment. I am using Laravel 11.x with Laragon. Serving from public folder. I am not using php artisan serve to serve app....
No description

Accessing Repeater field from JS code in view

Hi fellows, I have a basic form like this: ``` ViewField::make('qr-codes') ->view('filament.forms.components.qr-code-reader'),...
No description

Laravel 11 filament 3.2 panel installation issue

I just installed filament 3.2 and tried php artisan filament:install --panels after that I can't access anything anymore, because of the error syntax error, unexpected token "\", expecting "]" that is caused by the import of this provider: App\Providers\Filament\1PanelProvider::class. My research is not helpful, some sources say this version is incompatible with Laravel 11 others say 3.2.57 should work. So what's the truth?
Solution:
The --panels parameter is used to create a panel. Each panel provider has a PHP class. It seems you used 1 as the panel ID, which resulted in the creation of the 1PanelProvider.php class. Maybe this is the issue. Try to create a panel with a string identifier, such as admin

Problem with Admin Panel Authentication - 403 Forbidden on Production

I'm having an issue with my Filament admin panel. On localhost, everything works fine, but on production, after logging in, I get a 403 Forbidden error. Here’s my setup: - I created a custom Admin model and set up a new guard admin in config/auth.php:...

Help with action modal

Hi everyone, I'm trying to have a action modal rendered via a panel render hook, but I can't seem to get the action to do anything. Trying multiple YouTube videos/tutorials, it's not even giving me an error, just not doing anything. Livewire component:...
Solution:
rename renderHotelSwitch function to switchHotelAction Then, use {{ $this->switchHotelAction }}...

Searchable in select blade

Hello all, Please how to make city dropdown list in select to be searchable? Your kind support is highly appreciated....
No description

addaction - refresh repeater

If I use ->addaction to customise the addition of a repeater, how do I make it so that repeater refreshes with the latest data. At the moment, the data is going into the database, but I have to close the form down and re-open to see the new entry....

Blank Pages

Hi there, I just started using Filament, the application turns blank when I perform actions like clicking the sort icon on a table, clicking a pagination link etc? I can't seem to find why? I am using laravel 10.48.25 and filament v3.2...
Solution:
use ^ in the composer.json "filament/filament": "^3.2"...
No description

Is it possible to send POST data with `MenuItem::postAction()`?

I have a MenuItem in my Panel that I want to send a POST with: ```php MenuItem::make() ->label( fn () => locale() === 'nl' ? 'English' : 'Nederlands'...

Is it considered general practice to include generated contents of /public in source control?

Just gut-checking, my thoughts were public and its contents below should always be handled at time of deployment and excluded from source control, but updates to filament are re-generating the public/css and public/js folders. I have a vanilla deployment configuration in Laravel Forge, should be I committing these folders?

Livewire Table export action export 1 row

Something is wrong please help me find out what. table is being populated with 10 rows but export csv/xlsx is 1 and data is wrong. Thanks in advance!

modal form passing value from the action

In my view I have the following action:
{{ ($this->subscribeMemberAction)(['member_id' => $member->id]) }}
{{ ($this->subscribeMemberAction)(['member_id' => $member->id]) }}
this work pretty well, and I'm able to fetch my data from fillForm on the component:...

Validate on suffixAction

I've got a form that is mostly visual, and only a couple of editing points, and doesn't have a general submit. I thought I could be clever where I wanted a field to be editable in that view, by having a suffix Action acting as a save button for that field. ``` FormField::telephone('rf_referee_telephone')...

Multi-Select Losing State (with HTML option)

I think a large portion of the filament community relies on this old but spectacular post for using images in Form Select fields: https://v2.filamentphp.com/tricks/render-html-in-select-options Which now appears broken which means I bet many devs have a half working form at the moment. This is only true for ->searchable() and ->multiple() ...
Next