Filament

F

Filament

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

Join

an issue with BezhanSalleh\FilamentLanguageSwitch

I'm running into an issue with BezhanSalleh\FilamentLanguageSwitch. When I select Romanian as the language, it automatically switches to English (regardless of the previously selected language) without any errors or notifications. Has anyone else encountered this? Any ideas on where I should start looking to resolve this? Thanks!...

How do I create a test for filtersForm() on dashboard?

I'm having a difficult time creating a test to ensure one of my filters is providing the correct select list in the filtersForm() method on my dashboard. How can I target this method? ```php...

custom filament page not loading Filament assets CSS and JS

how to load assets filament CSS and JS in custom page, the page i created got the default filament assets or it loading defaults
No description

unique rule from filament is case sensitive ?

```php public static function getForm(): array { return [ Section::make() ->schema([...

display RichEditor

I have an api who fetch data and inside data i have richeditor field, i wish to know i can display it with html ??

mask money comma separate is not working

```php Forms\Components\Select::make('product_id') ->label('Product') ->options(Product::query()->pluck('name', 'id')) ->required()...
Solution:
```php Forms\Components\Select::make('product_id') ->label('Product') ->options(Product::query()->pluck('name', 'id')) ->required()...

Wizard navigation in modal

I currently have a working wizard in a modal, the only issue I have is that there is not enough room to show all of the navigation steps at the top. I wanted to scroll the navigation automatically so that the navbar shows the current step as I click the next/previous buttons. Is there either a way to do this out of the box or some way to hook into the current step to scroll the nav myself? TIA...
No description

Call to undefined method App\Models\User::buildings()

I have this method in my relationManager of buildings with users ``` ->headerActions([ Tables\Actions\AttachAction::make() ...

Is it possible to programmatically set table rows as selected

I want to hook into the table ->selectable() checkboxes and set them automatically depending on the row/record

How in richeditor to add option open link in new tab or not

Hi everyone mine question is in the heading. Does anybody knows how i can do this

auth()->user() is NULL for loading custom assets with data

Hi there, I am following this docs: https://filamentphp.com/docs/3.x/support/assets#registering-script-data Have added my code to AppServiceProvider boot() method, but auth()->user() is always null. ...
Solution:
Thanks Dennis, I just created a middleware for it and not it works. Did I missed sth in the docs? It says clearly ServiceProvider boot with this example

How to use filament component in front-end of website?

I want to use Filament buttons, but they aren't working for me. I've added the Filament and Livewire styles and scripts in the base layout: ```php @filamentStyles @livewireStyles...
No description

toggleColumn with confirmation modal

Hi everyone, i'm trying to add a confirmation modal to beforeStateUpdated method for toggleColumn. thanks

$record is null in table

I have created a custom table field which works almost correctly, I dont understand how it is possible to recieve $record is null error in ->avatar second closure. I am using user name first letters as a fallback if there is no avatar assigned to user
No description

Relationship Manager AttachAction custom form

Hi all, I try to attach Employee model to Training Model. In the table employee_tainings there is a required training_session_id. I would like to modify the AttachAction form to have another field so that user can select training session before submiting. However, No matter I try to change form() in configurationAttachAction(), it won't affect . Please advise how I would do this. ```php protected function configureAttachAction(Tables\Actions\AttachAction $action): void...
Solution:
I just found that I could not do it from function configureAttachAction, but it works on header action extensiion itself. ```php $table->headerActions([ Tables\Actions\AttachAction::make() ->form(fn(AttachAction $action): array => [...
No description

Hi is it possible to add an action to a Grouped set of rows (so the button is on the group row)?

I have a grouped row, i want to add an action to the row, i dont want to select all the rows inside the group just want the group column value, so i can generate a pdf for the whole group, i dont want to use bulk actions for this as i have to use checkboxes

Display a field as formatted json

Is there a way to display Components\TextEntry::make('properties') as a formated json, with indentations, so that it would look like ``` <pre> print_r($model->properties);...

How to do a ranking column in filament table that doesn't change?

So i want to build a ranking table with filament, where by the left most column will be called 'rank' it should go from 1 to (number of records) Then as i press the sort indicator on the other columns, it get sorted, but ranking number on the left side don't change...
Solution:
I checked and the above works for your use case. Simply add the following as the first column in your table. Tables\Columns\TextColumn::make('rank')->rowIndex(),...

responsive repeater

How to make this repeater responsive on mobile ?