Filament

F

Filament

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

Join

Issue with minimal theme outside Panel

Folllowing the tutorial (https://whizzy.dev/themes/minimal) i get an error stating:
The `bg-primary-100` class does not exist. If `bg-primary-100` is a custom class, make sure it is defined within a `@layer` directive.
The `bg-primary-100` class does not exist. If `bg-primary-100` is a custom class, make sure it is defined within a `@layer` directive.
...
No description

How to get rid of clear all in notifications sidebar

how to disable this ? since i dont want my user to accidentally clear all his/her notification on one button
No description

How to make filament to trim form input?

Laravel uses TrimStrings middleware to automatically trim all form string inputs. However, I noticed that filament allows data to be saved with trailing spaces. How do I enable filament to trim form inputs?
Solution:
```php // its by design from Livewire to skip TrimStrings // in the source code here vendor/livewire/livewire/src/Mechanisms/HandleRequests/HandleRequests.php // in the boot method they have...

Creatinga a new option in select

i using this code in select ->createOptionForm([ TextInput::make('label') ->label('New category') ->required(),...

Livewire custom component blank after Popup Called

I have livewire component called FormDocumentInfolist it will show list data, the data will be empty after a modal shown. #❓┊help...

Wizard Step depend on Select Value Causing Problem

I have Wizard That has One Step and this step includes ToggleButton to select I have another Step that is only visible with one of the select values using ->visible() method. " for sure select is live() " the problem is the function of the visible step works fine but there's no button to go to the next step....
No description

How should I define the exportAction exporter class in order to export hasMany relation?

Use case: - I have a Product model, product has many prices. ``` public function prices(): HasMany { return $this->hasMany(ProductPrice::class, 'product_id');...

How to dispatch an event from an Action

Hi, I have a View Action, very simple, on click I want it to trigger an event that should be queued... so far I have: ```php...
Solution:
I dont think its an issue with Filament, Action can call any function, can you confirm your env file QUEUE_CONNECTION and can you confirm your queue is working please

Problem with month translation in Filters - related to Carbon?

We have a very interesting issue with months translated through src/Filters/QueryBuilder/Constraints/DateConstraint/Operators/IsMonthOperator.php:getMonths(): ```php protected function getMonths(): array...

Component with actions in a loop?

Seems like I have to render the <x-filament-actions::modals /> for each component having actions in my loop, which causes couple of problems: - the action modal becomes a child element, so all clicks on it bubble up and have to be dealth with - it renders the modals form in the DOM as many items there are in the loop ...

Resize image keeping aspect ratio

Hello everyone. How do I use the imageResizeTargetHeight in the FileUpload component with a defined height and have it calculate the width ratio automatically? Thanks

419 This Page has expired

I am facing a problem with filament multi panel each panel has its own user guard so for example if open both in the same browser and log out from one of the panels I get a page expired on the other and vice versa. Has anyone been fixing this problem before?...
No description

Wikicenter with Gutenberg or similar

I'm wondering what could be the most intuitive combination for filament, with some custom editor to build a company knowledgebase with pages that can be edited easy and fast. Something like Wikicenter. As the current solution is running on Wordpress with its Gutenberg editor, I'm thinking about a filament + laraberg combination. I'm not very experienced, so I'm wondering what experts think about this combination or if theres something else around that can handle multiple content types in one editor (galleries, videos, text, tables, columns,...)?...

Set up Role Based Access Control

I have Installed filament 3.x on my laravel project, I'm using tall stack laravel 11.x, livewire 3.x, alpinejs and tailwind. I have the admin for filament i can login my user table has a column role and has 3 roles "admin", 'reseller' and 'client' , based on the role of the user i want to Set up Role Based Access Control in my app, what is the best practice to do this Thank you...

How customize Repeater's item using Livewire component?

Livewire 3x. I have a Livewire component OpportunityQuote that has a Repeater in its structure, like this: ```php...

How can I sort by value string on table?

TextColumn::make('source')->sortable(query: fn (Builder $query, string $direction) => $query ->orderByRaw(<<<SQL CASE WHEN source = 'A' THEN 1 ELSE 0 END {$direction}, source {$direction} SQL) ),...

Set table to use for filament resource

I am trying to use Filament with Laravel Permissions and have run into an issue. I set the model relationship manually protected static ?string $model = Model_Has_Roles::class; as that's what the table is called. However when I try to access it I get the following error: ``` QLSTATE[42S02]: Base table or view not found: 1146 Table 'ookma-kyi.modelhasroles' doesn't exist ...

Route [filament.admin.tenant.registration] not defined

I tried following the steps to enable multitenancy from the docs. Keep getting this error, even after clearing route cache and migrate:fresh. Page files are in app/Filament/Pages/Tenancy/* Tenant settings for adminpanelprovider: ``` ->tenantRoutePrefix('organisation')...

Default value error or problem with State

Hello, everyone! Please help me. I prepared this code and provided it with data without any issues, but for some reason, it's not working. If I remove the category_id error written inside beforeFill, it starts working, but when it's present, the data doesn't appear, only the default value. I thought there was a problem only with the default value, but it seems there's an issue with the state. ...
No description

Subnavigation position in blade

When I create the subnavigation I can choose the position between Start, End and Top. However, I want to place it in a specific space on the blade. How can I do this without having to create Tabs manually? Example: ```php...