Filament

F

Filament

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

Join

Using hint that the record is edited.

I want to show the input field is updated but after refresh the updated is gone. Is there any way I can make this code works...
Solution:
So you need to store that information somewhere in the cache or database
No description

two different panel with roles

Hi any option to do this? 1. i have two panel, admin and client 2. how i can set only specific role to be able to access admin panel 3. the other roles can only see client....
Solution:
$this = User model instance

Select default value from select dropdown

I want to set to set default value that i need it to be selected when the form render i tried this ``` Select::make('status') ->options([ 'draft' => 'Draft',...

Prefetch 503 Service Unavailable (from prefetch cache)

Hello everyone. Why does the network write error 503 Service Unavailable (from prefetch cache) for the prefetch request? SPA mode is enabled. This error is only on production. There is no such error on the local machine....
Solution:
Yes, this error is due to the "Speed ​​Brain" optimization enabled. I disabled it and there are no more errors. But there is no prefetch either. Apparently, this module did it, not filament.

Custom Action successRedirectUrl

Hello everyone, Is there a way to trigger succesRedirectUrl and successNotification after an action is successful?

Multiple 'violating node' warnings in browser console after deploying to production

After deploying my Filament app to production, I noticed a lot of 'violating node' warnings in the browser console. These warnings show up across different parts of my resources and point to various HTML fragments. I haven’t created custom views, only models and Filament resources. Is this something I can fix, or can I safely ignore it? Any guidance would be appreciated, as I'm unsure where to start. Thanks! ( log: A form field element has neither an id nor a name attribute. This might prevent the browser from correctly autofilling the form. To fix this issue, add a unique id or name attribute to a form field. This is not strictly needed, but still recommended even if you have an autocomplete attribute on the same element.)...
No description

redirect after creating entity

I've put a afterCreate() into my CreateDog.php file. I can confirm it does call that hook it isn't honouring my redirect, and just redirecting to the default location...

Observer causing update form to get stuck

Any idea what's causing it? This is my observer ```php public function updated(StartRonde $startRonde): void...
Solution:
If you're saving the same model that the observer is using you'll get a loop. Try to change $startRonde->save() to $startRonde->saveQuietly() so that it doesnt trigger events

How to use another relation's column as titleAttribute in Select

Hello everyone. Please check my first screenshot. As you see, I list unused permissions in Forms\Components\Select But my permission also have this relation: permission->permissionLanguages->where('language_id', Auth::user()->language->id)->first()->name ...
Solution:
try using this
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->permissionLanguages->where('language_id', Auth::user()->language->id)->first()->name}")
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->permissionLanguages->where('language_id', Auth::user()->language->id)->first()->name}")
...
No description

add separate form inside each tag item

I want to add form inside tag. My requirement is to have form inside each tag item. I know there is Tag component. But it is used inside form. But I need to pass form schema inside tag item schema.

Customizing navigation items

I don't want all the Resources to show up in the left menu.. I checked the docs and it says: ```...

How to switch/invert toggle in Filament

Basically what I want to do is, whenever a toggle is true, the other has to be false. I couldn't find my latest code so I only have this code to show:
Toggle::make('pergunta'),
Toggle::make('requisito'),
Toggle::make('pergunta'),
Toggle::make('requisito'),
...

mask method triggers afterStateUpdated() method on page load

Hi, How to preven mask triggering after afterStateUpdated() method, within this method I handle walidation. So when page loads (empty fromfields), it triggers afterStateUpdated() method and shows validation errors even before filling any form fields.

🐞 TextInputColumn type('date') - can't manuly edit

I have table with TextInputColumn. I used ->type('date') method which should be valid. I see native datepicker in my table. I can edit this column with datepicker (in my browser there is calendar icon on the right side). This works just fine. But when I want to edit the date manualy before I can type more then one number (like: 12 - auto skip to month - 10 - auto skip to year - 2024) the event is fired. Value is send to server and this can make a nice error because the date may not be completed. Am I doing something wrong? Am I missing something or is this really bug? I am kindly asking for help 🙏....

How to Add Non-Existing Items to a Select Input on Enter

I'm trying to achieve the following: Using a Select , when I search for an item that doesn't exist and press enter, I want the new item to be added to the list of selected items. Upon submitting the form, both the new categories and a new product should be created. How can I implement this behavior?...
No description

Error on any upload

I need some help please!!!! i attached two pics with error...
No description

Custom Table Values

Hey, I have a List table view here, and my entity (model) doesn't actually have the values .. they're in another table. I need to control the point where it grabs the value. I saw on the v1.0 docs (accidentally landed there) that we can do Column->getValueUsing(), which I thought might have been right, but i'm on v3 now....

How to send parameter to CreateAction?

I have a dinamic page to list Questions Models based by url query string altering query on table like this: ``` return $table ->query(function () {...

had some issue with admin panel login

I'm trying to login to my admin page but faced this issue, for unknown reason, I tried several solutions but none solve the issue help is much appreciated 🙏...
Solution:
it seems to be issue with my machine itself, tried the same branch in another machine it worked fine, I'm gonna close this thread
No description