Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

Select dynamic placeholders

Hello everyone, I'm currently trying to make a select placeholder dynamic. ```php return Select::make('blabla') ->options([$this->options])...

Custom sort option

Not sure if I'm missing something but I can't find anything relevant in the docs/online Is there a way to add a custom sort option, without having the related column appear on the table? Eg I might want to sort by the ID column, without having the ID visible on the table....
Solution:
What about ```php TextColumn::make('ID') ->toggleable(isToggledHiddenByDefault: true)...

Load custom data (break schema and load custom model) to Schema v4

Hello guys, I have a simple page in a model, it means "view" page. I want to show a custom data (model) inner of infolist, i could not find a way how can inject a custom model inner of a Schema ``` <?php ...

Closing tab after saving changes from EditResource

I am opening an EditResource page in a new tab from the front end. Is it possible to also close the tab once the user has saved changes? I tried dispatching an event from getSaveFormAction action's after method but I can't get the event to fire. Just "livewire:init" shows up in console. 🤔 ```php protected function getSaveFormAction(): Action {...
Solution:
Ok I sort-of managed to do this using ```php protected function handleRecordUpdate(Model $record, array $data): Model {...

Category checkbox tree in filament?

Is there a component that allows me to do something like this in Filament? I really need something like this to place and assign categories to products in an e-commerce store.
No description

Tailwind bg colours not working

I understand that specific changes are happening in version 4 of TailwindCSS, but I am currently encountering an issue in version 3 where some background colours are not functioning as expected. For instance, using standard TailwindCSS colours such as bg-red-500 and bg-blue-500 produces inconsistent results. While bg-red-500 works as intended, bg-blue-500 and other colours like bg-slate-500 do not appear to render at all. Is there something I need to add to my panel configuration to make these options available?...

Any way to change the DatePicker (non-native) locale?

My DatePickers are in English locale, e.g. saying "July" instea of "Јули" based on my env locale. Any way to change this? What library is used on the FE for the DatePicker?

Is it possible to retrieve the parent id of the relationship?

I have a repeater for questions and its like this, Questions -> options (list of questions) ``` Answers::make('options')->addAction( fn(Forms\Components\Actions\Action $action) =...

RelationManager creating "Parent" error

Bit of an odd scenario, but this is what suits us better. I have an IP Address model, and a Host model. Now, an IP can obviously only be assigned to one Host, but a Host can have multiple IP addresses. As such, I have them setup with a BelongsTo relationship on the IP address, and a HasMany relationship on the Host. Now, I am going into the IPAddressResource View page, and using the relation manager to create a host, but getting the error...

Tenant menu and registration not working in v4

I am not sure if this is an unfinished feature or a bug in v4 beta? This is added to my code: ```php ->tenant(Organization::class, slugAttribute: 'code') ->tenantRegistration(RegisterOrganization::class)...
Solution:
Oh, I just realized I forgot to configure the policy for the tenant model. My bad 😝

Filament `4.x` blade rendering

In Filament 4, tables are now rendered as a single large blade view, which significantly improves loading speed. However, when you add custom views to individual columns, each of them is still loaded separately. Is there a way to apply the same optimized rendering logic to these custom column views?

Simple JavaScript is not running in the filament widget

<x-filament-widgets::widget> <x-filament::section> <div class="bg-white p-6 rounded-2xl shadow w-full max-w-md"> <h2 class="text-xl font-semibold mb-4">Profit Calculator</h2> ...

Table pagination button issue

I got bug where pagination displayed normally on localhost but on production server it got turned into "next" and "prev" button instead of usual 1, 2 ,3 etc.
No description

Creating Laravel Sanctum Tokens

When I try to create a laravel sanctum Personal Access Token from a filament action, my panel is no longer accessible (500 error) until I delete that users session. Only my filament panel is affected. There is no error logged in Laravel or nginx on my local development environment (Laravel Herd) I'm using Auth::user()->createToken() to create my access tokens....

"reorderRecords" action not found when testing a reorderable table

Filament v4 (Beta 15) My CategoriesResource table has reordering enabled: ```php...
Solution:
```php livewire(ListCategories::class) ->tap(function (Testable $testable): void { /** @var ListCategories $livewire */ $livewire = $testable->instance();...

Relation Manager not visible in Nested Resource

I have created a nested resource and registered a relation manager within it, but the relation manager is not visible inside the nested resource. Is this the expected behavior in Filament v4, or is it a bug?

User does not have right permissions in API Service plugin

Hello All, For any Non-Super Admin user, I am getting error User does not have the right permissions. while using API. The token created for the user has [*] ability. I tried to give permission to the role and attach the role to the user, but it still doesn't work. I am using https://filamentphp.com/plugins/rupadana-api-service plugin alongwith Spatie Laravel Permission plugin....

Persistent Livewire Modal State Issue with Multiple Header Actions

Environment: * Filament Version: 3 * Laravel Version: 12 * PHP Version: 8.3...

Wizard Submit Acton can't hide in view page.How can I hide?

Wizard::make([ Wizard\Step::make('Step 1')->schema([ // ]), Wizard\Step::make('Step 2')->schema([...