Filament

F

Filament

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

Join

file upload error

Does anyone has an issue with FileUpload form field? FIle is uploading as saved, but when I try to edit record with FileUplaod field I get an error: foreach() argument must be of type array|object, string given Laravel 11. Does anyone has a solution?...
No description

CreateAction in panel builder confirmation (with wizard)

Where CreateAction is deafulting to create page class and then using a wizard via getSteps().... ...is there a way to easily enable the confirmation modal at the end of the wizard ?...
Solution:
I don't think this is currently possible. wire:confirm or a custom submit button in the form are a workaround https://github.com/filamentphp/filament/discussions/13933#discussioncomment-10394112...

beforeSave whith relations

I have the following process in beforeSave() of EditSale.php, in which I restore the stock (quantities) of products, before the records are saved, as indicated by the "beforeSave" hook, but it turns out that when entering this hook the data of the relationship (SaleDetails) has already been saved. ```php protected function beforeSave(): void {...

production

Hello, I'm using filament on my project, I have the internet access while the development phase, but it won't be accessible on the production phase. So can you tell me what I have to do to make my project working correctly without internet connection?

SimplePage render custom view data?

Hello, I'm trying to create a SimplePage that non-logged in users can view. I'm just having a issue where the data set in
getViewData()
getViewData()
or a custom
render()
render()
function is not showing up to the view? ...

MorphOne mutateRelationshipDataBeforeCreateUsing does not work properly

For some reason, if I use mutateRelationshipDataBeforeCreateUsing() the related model gets created with the correct values used in the closure, but Filament runs an update query right after the creation, with the original data inputted. I can also confirm this by using mutateRelationshipDataBeforeSaveUsing(), because this runs as well and does not have the mutated data from mutateRelationshipDataBeforeCreateUsing(). I'm confused, why Filament does behave like this. It's a problem, because I cannot set my token without getting SQL exceptions, when Filament tries to update it immediately after creation with the wrong value....

bottom menu

Hello, Is it possible to create a mobile menu like in the image instead of using the hamburger menu?...
No description

How to synchronize filters between Livewire components in Filament Dashboard Custome Page?

i'm working on a Filament dashboard that displays orders and their locations on a map. I have two Livewire components: ListOrders and AddressMapWidget. in dashboard-order.blade.php @vite('resources/css/app.css') <x-filament-panels::page> <div class="">...

Preload options limit from relation page

I have a relation page, and when I go to attach my relation, its all searcahable, but how can I add a preload with 5 records? ```php class ManageOrganisationProducts extends ManageRelatedRecords {...

How to run javascript code on filament panel logout?

An analytics SaaS i use ask me to run some javascript code on every logout, how do i hook into filament panel logout to run that javascript code?

How to set date of the DatePicker component?

I wish to set the Maturity date when the Loan Date is entered. I have written the code as below ->reactive() ->afterStateUpdated(function (callable $get, callable $set) { $scheme = \App\Models\Scheme::find($get('scheme_id'));...

Incremental itemLabel for repeater

Hello everyone. 👋 I know this question has already been asked several times, but I haven't found any answers... Basically my question is simple: I'm creating a form with a repeater (questions). In this repeater, I've a second one (answers). ...
Solution:
I found a solution on Github for those who are looking too : ```php ->itemLabel(function ($state, $component) { $key = array_search($state, $component->getState());...

Why wrap is not working on the textcolumn

Hi everyone i am using text column to show mine note but the problem when text is longer it breaks the table and somehow ->wrap(true) is not working. What is here a problem
Tables\Columns\TextColumn::make('notes')
->label(__('table.notes'))
->copyable()
->wrap(true),
Tables\Columns\TextColumn::make('notes')
->label(__('table.notes'))
->copyable()
->wrap(true),
...

Textarea not showing content and having JS errors

I have Textarea component in a form, when the page loads, the content of Textarea shows a split second and then Textarea is empty. If I type in anything its there and saving it works and I can see the data in db but when I load the form again the Textarea is empty. This is not happening on my local machine but only on server. Attached is the screenshot of the error I am seeing in browser console on form load. Forms\Components\Textarea::make('my_template'),...
Solution:
@Leandro Ferreira I am sorry, I was using v3.0 stable and found this issue, but when I upgraded to v3.2 it all worked well.

Clusters opens the first resource page. Is it possible to avoid it?

I'm trying to implement my filament app with clusters to solve the third-layer collapsible navigation problem. I read on documentation that 'When clicking it, you are taken to the first resource or page in the cluster.' Is it possible to have a different behavior? The feature I'm trying to get is that once you click on the Cluster menu, it only opens the second sub-navigation bar, and then the user may choose the resource that would like to open. Any help?

Opening modal from a custom page

Is it possible to open a modal from a class that extends Page? $this->dispatch doesn't seem to be working, I want the modal to automatically open at the end of my submit function...

How do I test the registration form and my custom redirect?

Hi, I want to test my registration form with pest tests. But how?

Customize multi tenancy dropdown selector

What is the best way to customize the css of this dropdown selector? I want to make it scrollable when there are many tenants that the user is belong to. I already did that, but the problem is how can I select that specific element and apply the CSS, is there a way to add a id to that element? Because the dropdown list in my sign out button is also getting the CSS....
No description

How to customize the relation manager for the create button

Hello filament lovers I've a relation manager for contacts I've managed to customize the Create Contact by overriding the method getModelLabel from the class Filament\Resources\RelationManagers\RelationManager and it works fine. The thing is the method is marked as deprecated and says Override the table() method to configure the table....

Multi sub domain session sharing

How can I share user sessions between two Filament dashboards running on different subdomains (e.g., admin.example.com and dashboard.example.com) that use the same Laravel codebase and database? I want users to remain logged in when switching between these dashboards I've already set SESSION_DOMAIN=.example.com in my .env file, but it's not working[it doesn't redirect to the dashboard page for both]. What other configurations or code changes might I need to make this work?...
Solution:
I think I had issues with the browser caching, cos it's working perfectly fine on another browser