Filament

F

Filament

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

Join

Validation for custom page

Hello everyone i have a case where when time is filled with value interval start_date and end_date must be filled how i can add validation for this case
Solution:
What about min date? ->minDate(fn($get, $state) => $state)...

Display breadcrumbs and title of the page in topbar

Hello, I need to display breadcrumbs and title of the page in the topbar. It works like a charm on list pages, but as soon as I go on a Edit ou Create Page, I got this error: Using $this when not in object context. ...
No description

Lower payload size

Hey, I have a table with 43 columns. Currently, loading 25 rows shows 2.35 MB in the network tab. When I comment all of them out, I get approx. 300 kB for that table. Is there any way to minimize the size? There are no crazy columns (no images etc.), just text....

Getting "Detected multiple instances of Alpine" and not sure on how to attack this issue

Hi! I use Filament for my admin via the panel builder which is superb. I now started to use the table builder for one component in the frontend of my application. I now run into an AlpineJS conflict and not sure how to attack this. In my footer I have @FilamentScripts...

Passing JSON key to $wire.updateTableColumnState, in a custom column

Hi, i'm having trouble to replicate something i did with a toggle column, with my toggle column if i did it like this ToggleColumn::make('itens.'.$key.'.Delivered') It would change the value correctly, but i need to iterate thru a whole json, so i made a custom column but in the method updateTableColumnState() if i try to the name with a key, it doesn't change anything nor throw a error...
No description

I am getting an error for the custom filament page

Hi i just made the new filament page i make it with command
php artisan make:filament-page Statistics --type=custom
php artisan make:filament-page Statistics --type=custom
but for some reason i am getting the errors in console for the livewire i do not know is that because i do not have the record for mine page or i do not know code for mine page is down below statistics.blade.php ``` <x-filament-panels::page> <x-filament-panels::form wire:submit="save"> {{ $this->form }} <x-filament-panels::form.actions :actions="$this->getFormActions()" /> </x-filament-panels::form >...
No description

Javascript Module Import

Hello, I am trying to import a Javascript file from either public or resources - whichever is easier. It appers it needs to be imported as a module, but I am seeing this error ...

rendering Relation Manager table on a custom blade page

Is it possible to render a relation manager table out of resource file I have class User Profile that extends a layout class User Profile Layout extends Page (this is linked to the resource) and for User Profile t i am using a custom blade view...

Is it possible that based on the value of the component other component is not visible

Hi everyone how i can make that when mine component radio value is interval then i show mine component when is something else do not show

Disable Previous Dates in End Date Picker - User Should Not Select Before Release Date

I'm trying to disable dates in the end_date picker so that users cannot select any date before the release_date using Filament's DatePicker. Here's what I have so far: Forms\Components\DatePicker::make('release_date') ->required() ->reactive()...
Solution:
```php DatePicker::make('release_date') ->live() ->afterStateUpdated(function (Set $set) { $set('issue_start_date', null);...

loading indicator between table tabs

Any ideas about adding a loading indicator when switching between table tabs

Is it possible to have a minimum width for the text input column in mobile?

Solution:
Maybe a custom style? ->extraInputAttributes(['style' => 'min-width:100px'])...
No description

Repeater with 2 Unique Key Combinations

Good morning, I have a case where a course has a cost based on a "mode" and "type". Initially, it was based only on the "mode", and this code in CourseResource worked perfectly: ```php use Filament\Forms\Components\Repeater; use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput;...

Tags & Translatable Plugin

Hi folks, i'm trying to use Filament Spatie Tags & the translatable Plugin. The Translatable Plugin runs like a charm, but how to implement the Tags to work with the translatable Plugin. I cant find anything and just to do this: public $translatable = ['description', 'location_description', 'tags']; does not work. Thx for ur help...

Select multiple on edit disable delete of selected items

Is it possible to disable deletion of selected items in multiple select on edit page. Example: on create operation, user chooses two of three values. On edit operation, selected values should be disabled or unable to delete. The user can only add other value....
Solution:
maybe this? ->selectablePlaceholder(fn (string $operation) => $operation === 'create')...

Restrict media library pro view to folder

I have been working with Laravel Nova for a long time, now I have dared to use Filament and I have to say, I am thrilled. Thank you for your great work ❤️ I bought the #media-library-pro plugin and would now like to define the home folder of the FilamentMediaLibrary in the provider in my panel user. For this I have extended the user table by the column home_folder_id and created an event listner, which creates a “folder” when registering users and writes its ID to the user table....

How to display default values from relationships in Filament form for dynamic tables?

I have a form in Filament where I’m dynamically generating input fields for different tables using a relationship. Each table has fields like title_label, title_label2, target_label, and value. The value field should be populated with default data from the relationship (reportTable). Here’s a simplified version of my code: return $parameter->tables->map(function ($table) use ($record) {...

filament auth and routing

I have an app that has 2 level user which is operator and user.currently,i'm using filament generated login page for the operator dashboard,and my own login page for the user page. i planned to only use one login page,i use a middleware to make non-operator user can't access the operator dashboard,i also make the operator/login forbidden for all user role (since i only want to use my own login page). but then i got one problem,since the filament "operator/login" is made forbidden,operator who tried to sign in would be redirected to a forbidden page,which i think is a bad user experience. how to override the route so that when operator sign out,they would be redirected into "/" instead?...

import csv with pivot table

Hi everyone, how to import csv data and insert it to pivot table?

Broadcasting and Ably

Nothing happens when I do
```php $admin = User::first(); ...