Filament

F

Filament

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

Join

Panel heading / info block?

Is there a way to put information/panel notes/etc.. at the top of a panel table?
No description

Issue with Filament Session on Production after Deploying with Laravel Forge on DigitalOcean

Hi everyone, I’ve recently deployed a Laravel project using Laravel Forge, hosted on DigitalOcean. The project is a Filament-based application, and everything was working perfectly on my local machine. However, after deploying to the server, I started encountering session issues—users were unable to log in, and the session data wasn’t being stored properly. After some troubleshooting, I discovered that the problem was resolved when I changed the APP_ENV setting in the .env file from production to local. With APP_ENV=local, the session works fine, and users are able to log in as expected. But, of course, running the app in a "local" environment on a live production server raises security concerns....

Add condition if column value blank in table

In Resource I have a form with label 'Download Url' the field is not manditory. So, when the user doesn't add any value to this field I would like show other field value in place in Table. Any idea on how to achieve it? ``` Tables\Columns\TextColumn::make('name'), Tables\Columns\TextColumn::make('download_url')->label('Filename') ->formatStateUsing(function($record) {...
Solution:
use state instead of formatStateUsing
No description

Issue while implementing solution-forest/filament-access-management

I’ve successfully added the configuration for role and permission management using the filament-access-management plugin. However, when I try to access the menu, roles, or permissions in the browser, I get a 404 Not Found error, and they are not displayed. Is there something I might have missed in the setup, or any additional steps needed to ensure the menus and permissions appear correctly?...
No description

Rich editor alignment formatting?

Hello, Is there a way to enabled content alignment in Rich editor? I couldn't find any plugin option for this....

save filter data in variable

in my code i want to save choosen filter in my variable like i have $status variable and i want to save there this ```
protected function getFilters(): ?array { return [ null => 'Show All', ...

How can I pass an owner to a create page?

I have a channel model and post model, and when I am inside the Channel Infolist Page, I would like the create button of that relation manager pass over the channel model I am using a wizard on the post creation, and when an owner is detected, I would like to omit that step thanks!...
Solution:
You mean this?

Edit Action unexpected character

I have a table with an edit action. ```php EditAction::make('edit') ->label('Rename') ->modalHeading('Rename Key')...
Solution:
$data is used to get the modal form data https://filamentphp.com/docs/3.x/actions/modals#modal-forms...

Using shield plugin but roles and permission page not found

I recently completed my project without the shield plugin. Now, I want to add roles and permissions. I've followed the documentation, but the roles pages aren't appearing for my super admin user....

Form builder does not allow decimals. (?)

Neither dot or comma is accepted - chrome@mac Any solution? ```php...
No description

Grid not applying to Section

applying grid to section in modal not working as expected wanted to set it to 4 columns but it shows as 1 column instead ```php protected static function getPermissionForm($permissions, int $grid) {...
No description

How to have 2 fields per row in full width tab?

I've used Tabs::make('Tabs')->columnSpanFull()->tabs() to create full width tabs. Now I can't seem to have 2 fields per row within the tab. It probably sounds noobish but I just started filament now and been trying to get used with docs but unable to figure it out....
Solution:
use Group ```php ... Tabs::make('Tabs') ->columnSpanFull()...

is it possible to use single login page to redirect to their own panel based on role?

Im building an intern management app where there will be 3 roles such as admin, mentors, and interns. im really wondering if you could use just a single login page then redirects them to their own panel based on their role? bare with me cause im really new to filament and laravel, thank you...

REDACTED Relation Managers not rendering on resource

I have been trying to add 2 relation managers to my CarrierResource.php - CarrierTasksRelationManager and CarrierActivitiesRelationManager. I have done my best to define the appropriate model relationships but fear I have missed something along the way. The other 4 relation managers on the page do render, but the 2 aforementioned do not. I will attach files for context. I am new to PHP and Filament and have only a couple of months of experience. I appreciate your patience!

How to change resource form opened by edit action on a relationmanager

This is going to get confusing but let me try. I have 2 models Degree and Programs, these share a many to many relationship that includes pivot table data. These tables are also accessed from a different (legacy) application so the pivot table needed to have it's own id field. So I made a model and resource in filament called DegreeProgram. I have setup the forms etc for DegreeProgram in filament but it looks ugly having it on the navigation menu. Within the DegreeResource I have a relationmanager for programs and would like to have the create and edit actions from that relation manager redirected to the create and edit forms for the DegreeProgramResource instead, while leaving the attach/deteach actions link the the original relationship. I tried editing the relationship manager to use the other form but that threw this error
Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given.
Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given.
...

Nesting Breadcrumbs?

I found the documentation on how to set up a Navigation group or to assign a page or resource as a child of another page or resource, but the breadcrumbs don't appear to reflect these relationships. e.g., I'm setting up a tool as a package, so i want all the menu items to show up under a single item that folds or hides (group and parent/child both seem to do this) when not in use. My tool has a color model that stores default colors used by the tool, as an example. When I select Color, it defaults to going to the list of colors....

nextAction on Wizard built with getState Function

Good evening, I'm trying to change the label of the next button on a Wizard built with the getState function and cant seem to get how to access the button. I've published the form translation but it also does not work. Thanks in advance!...
Solution:
The easiest way to do it looks like you create you own "HasWizard" trait! Copy the code from the orignal trait and then change the label as you wish 🙂

emptyStateHeading and emptyStateDescription not working in RelationManager tables

Good evening, I'm trying to change the heading and description on a relation manager empty table and using these function does not work. Is it supposed to or a bug? If it is, how could i change these without the functions? Thanks you in advance...
Solution:
it was supposed to work if you are using this to the relation manager class ```php return $table ->emptyStateHeading('xxx')...

How to get actually theme on filament

Hello, I would like to get the current color of the filament, is there any way within DashboardAdmin.php?
Solution:
solution ->
filament()->getCurrentPanel()->getColors()
filament()->getCurrentPanel()->getColors()