Filament

F

Filament

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

Join

Run function after "Save" button is done

I would like to execute a function after I have clicked on ‘Save’ and the save was successful
Solution:
You can use afterSave hook

how to handle widget with multiple dashboard ?

i create 2 dashboard with different widget, then how to handle widget in spesific dashboard ? because i want remove 3 widget after form and chart
No description

Conditionally hide SelectColumn based on email domain

I'm working on a Laravel project using FilamentPHP and need some help conditionally hiding a column in a table. ```php public static function table(Table $table): Table { return $table...

How to Pass Dynamic Data from Filament Form to Livewire Component for Price Calculation

I'm trying to create a Livewire component that displays the price of a product within a Filament form. The form allows users to manipulate several select fields (to change color, model, etc.), and each change can affect the price. My goal is to display the updated price whenever the form values change. I've been using this documentation page as a reference: https://filamentphp.com/docs/3.x/forms/advanced#inserting-livewire-components-into-a-form Currently, I can pass fixed values to my Livewire component like this:...
Solution:
Livewire::make(CheckOutInfoList::class, fn (Get $get) => [
'field_1' => $get('field_1'),
]),
Livewire::make(CheckOutInfoList::class, fn (Get $get) => [
'field_1' => $get('field_1'),
]),
...

Header Action Button doesn't show on production on custom panel plugin

Hello. I create my first laravel plugin and first for filament 😉 Its aplugin to show laravel logs. Its a first first version of plugin. It works fine at this moment, but i have a problem and i don't know how to fix. I add a header action for a table (it's in page). In local dev the action button its showed, but on production its not be showed....

disable or fix fileupload validation

I need the accept attribute to be
image/*;capture=camera
image/*;capture=camera
since it's the only attribute combination that gives mobile devices an option to either click a photo, or choose one from files/documents (which is exactly what I need). But when I do that, I can't upload any images as it gives me error : file of invalid type. How can I fix this? code: ```php Forms\Components\FileUpload::make('product_ean_image_url')...
Solution:
Yes, I understood. capture="environment" says: Use the camera. So you only get camera option. <input type=“file” accept=“image/*;capture=camera”>...
No description

Menu scroll to top After click on item.

Hi, i'm facing an issue with my app. When users clicks on an item on thé sidebar menu, it's not set focus on thé selected item, it's scrolling up. Is there an solution for that? How to fix it?...

Issue with Table Summarizer visibility not updating when filters change

I'm trying to show/hide a Sum summarizer based on specific filters being active. I can successfully detect the filters using $table->getLivewire()->tableFilters['remise']['value'], but there seems to be a timing issue. The summarizer only updates its visibility when the page is fully refreshed. When applying filters through the UI, even though the table data updates via Livewire, the summarizer's visibility state doesn't update until a full page refresh occurs. Here's my current code: Tables\Columns\TextColumn::make('montant')...

Open builder block picker in modal instead of dropdown

Hi I'd like to use a modal for my builder field's block picker (instead of a dropdown). Does anyone know if that's possible? Thanks!...

filament have ? free plugin like menu drag and drop like wordpress ??

filament have ? free plugin like menu drag and drop like wordpress ?? Link github please

Default button alignment for Repeater action

Currently default behaviour is to center a button, this can be overrided with ->addActionAlignment(Alignment::Start), however it bloats the code. Is there anyway to set a default position? Or override / extend / hack class to do so? This also looks strange since Forms submit button is placed on the left....
Solution:
You could set a default via ServiceProvider I suppose. Something like: ```php Repeater::configureUsing(function (Repeater $repeater) { return $repeater...

Same field in all forms/resources

Let's say we have a Select Field for selecting company in 90% of our forms. Same for table column. Is there anyway to avoid repeating the code. Either by doing some CompanyForm that already has it in the schema, somehow using a trait, making a custom Resource such as CompanyResource which we extend. I cannot really find the best or most appropriate solution for this. Anyone experienced anything similar and have any suggestions on how to best solve it?...

Pest Testing Issue: “Cannot declare class” Error with Multiple Tests in Same File

Subject: PestPHP Testing Issue: “Cannot declare class” Error with Multiple Tests in Same File Hello everyone, I’m encountering an issue while using the PestPHP testing framework in my project. I have two tests within the same file, and a beforeEach hook:...

notifications are not added to the notification modal

i had an issue and i tried to run a clean system to check it. laravel 11, filament v3.2, livewire. i installed the filament panel, made the notiable trait in the user model, made a notification file, made a test route to try the notification and made a test custom page in filament that pulls the notifications for this user. ...
No description

FileUpload to Cloud Flare not working

Hi there, when I upload to CLoud Flare using S3 and FIleUpload I got following error: ```xml...

Looking for Text Editor accepting routes

Hi there I'm quite new to Laravel and Filamentphp. I am looking for a text editor plugin which could accept routes instead of url behing link. Don't know if it exists or if it is even possible to have such option. Any help or info accepted. ...

Multitenant

Hello, is there any example of how to correctly implement multitenant for multiple databases? I have tried with the stancyl package and filament3 but it does not work. and laravel 11...

Blocking logins from different domains

Hi, is there some sort of protection that whenever an admin tries to login that has an email that does not match the website it blocks that. What I am experiencing: All users with [email protected] work and are able to login but whenever I change an users mail to [email protected] the login states that credentials do not match. If I change the mail address back again to [email protected] it works like expected again....
Solution:
Check your canAccess function on the user model, maybe you're checking the email domain there. By default laravel auth doesnt block access based on the domain.

FileUpload does not fully initialise in collapsed Form Repeater/Builder on edit

When using collapsed Repeater or Builder and when editing items, the FileUpload would not fully initialise. I have 4 items in the repeater; The page loads with all these items collapsed. I expand random item - the image upload field is correctly initialised with image, delete button etc. I then open second item - the image loads, but the Drag & Drop your files or Browse message is showing on top of the image and delete button prompts to upload a new file. When new file is uploaded - both newly uploaded and previously uploaded images get deleted....

redirect new registered users to additional registration wizard

I want new registered users to continoue registration prcess by redirecting them to a wizard where they can provide additional important information. this will occue only once. I tried to use middleware redirect but i am getting too many redirects error!
Solution:
You also have to check if you are on that route otherwise it’s an endless loop.