Filament

F

Filament

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

Join

A table with minimum rows.

Hello, I have a question. Is it possible to have a table where it show 5 rows even if there is not enough to fill it? example: I want to have a table where, if there is only 1 row from the sql, it will render even empty rows until it has 5 rows. ...

Cannot load routes if path('') is empty

I'm new to filament, so maybe I'm doing something wrong, but in a completely fresh installation of Laravel (just plain Laravel, not Fortify or other frameworks), and a fresh installation of filament, when I change the path from path('dashboard') to path('') in DashboardPanelProvider, filament cannot charge the routes of the pannel once logged in. Route [filament.dashboard.pages.dashboard] not defined. Tried to clear cache (both Filament and browser)...
Solution:
okay! I found the error after trying a lot of different things! I write the solution here just in case it helps someone in the future. As this is a new installation of Laravel, I forgot to remove the welcome route that was on path /, so this was the thing causing the error.

Link to Edit Record from Livewire Filament Table

Hello, I am having an issue with setting url to edit action on my custom Livewire component that includes filament table. My main Product Resource that i have, does not possess EditProduct it is slideOver action. Now i have tried linking like this...

Default at select fields not work

somehow at v3 the default at select field not work as simple as ```php Select::make('status')...
Solution:
did you add $this->form->fill() to the mount method?
No description

Import Action not working

I have implemented the ImportAction to import rows into the members table. After uploading the CSV file and mapping the columns accordingly, the imported CSV is added to the imports table in my database, and a job batch is also created in the database. However, the job does not get processed. In the job_batches table, both processed_rows and failed_rows remain at 0. I have tried running the following commands: php artisan queue:work...

How to Clear Job Cache

I have done everything, but my job cache is not updated. I run php artisan view:clear && php artisan config:cache && php artisan cache:clear && php artisan route:clear , but the Job class code is still not updated. The __construct function code is updated, but the handle() function code is not. I commented out the entire handle() function code, yet the job is still running. I added Log, but nothing is printed. Can anyone tell me how to debug this or flush the Job class cache?
Solution:
something like: php artisan horizon:terminate php artisan queue:restart...

Relation Manager in Tab component of parent Resource

What I am trying to do: I want my "Accounts" resource to have tabbed Relation Managers for its Many-to-Many relationships. The reason I want the Relation Manager inside a Tab component on the parent resource is because I need the editable "name" form field to be displayed outside of the tabs, on top, so it's always visible. What I did: I have tried declaring ``` public function hasCombinedRelationManagerTabsWithContent(): bool ...

Add new tab on resource list

HI everyone, i want to have two tabs on my resource list, a tab that contains the resource table and an other that contains a custom view. Is that possible? I’ve tried many things but didn’t worked. Thanks a lot

How to make a list of action in custom modal unique?

```php <?php namespace App\Filament\Resources\Inventories\RequisitionResource\Tables\Actions\Rfp; ...
Solution:
I don't think they are all being triggered at all, I think the loader is being triggered and the loader is just checking what's clickable. You can try wire keying each action to try to isolate it.
No description

file upload 401 unauthorized

Laravel 11.9, PHP 8.3, and Livewire 3.5, I'm experiencing difficulties with file upload. Every time I try to upload a file, whether it's an image or a video, I encounter a "401 Unauthorized" error, which only appears in the production environment. I've attempted multiple solutions from Google, but sadly, none have been effective, including some changes to Nginx configurations and other adjustments. ...
Solution:
Ok, also try added before the location .php etc location / { try_files $uri $uri/ /index.php?$query_string; }...

Save changes not working for records with multiple ids?

Is there any reason why the save changes button would work for a record and not for another, if they are of the same database table?

Building Custom Form in Filament Page

Hello everyone, I’m seeking guidance on best practices for creating a custom form within a Filament page. The form is quite simple: it includes a single input field and a button that triggers a modal dialog. The primary goal is to fetch a price from an external API. This form is independent of any Filament resource (i.e., no CRUD operations are involved; it’s purely a search function). Current Approach & Issues...

Sentry client side sdk

Anyone have experience with sentry on both backend and frontend reporting? right now i only have it setup in AppServiceProvider, anyone have an example how they set it up in the frontend for filament/alpine?...

is there a "starter kit" for filament testing

I'm looking at the filament testing docs and wondering is there a package or something will a huge amount of tests / boilerplate already built in? Because looking at these tests I think it would be good to test a huge range of things....

How to Use ->relationship() with $get() in $form?

I'm working on a Filament form where gst_customer_name should be saved in the guest_customers table when the user enters a name that doesn't match an existing customer. ~ TextInput::make('customer_name')
->afterStateUpdated(function ($state, callable $set) {...

use custom data for table

hello, i have a simple $table-> but instead of using a query, a relationship, or anything, i simply want to pass some constant data to it. is that possible?
Solution:

Extra css in panel

I want to add new extra tailwind css in panel navigation. What is the best apporach for that? I just want to add leading class. Not all the things! Thank you.
Solution:
Check the docs for "Theme" and go trough the steps to create one. That's all you need.

alpine error

Hello does anyone here encountered this error from version 2? Alpine Expression Error: Cannot read properties of null (reading 'includes') Uncaught TypeError: Cannot read properties of null (reading 'includes') ...

black screen on table action

when i make any table action like searching it give me a black screen
Solution:
thx guys i found the solution i changed filament to "filament/filament": "^3.2",

Unique validation on 2 or more columns

In my model migration, I have a unique constraint between 2 columns:
$table->unique(['column_1', 'column_2'])
$table->unique(['column_1', 'column_2'])
...