Filament

F

Filament

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

Join

Push notification on error 500

How to push notification when there's an error instead of showing modal?

Accordion on the table

Hi! Is there any way to add an accordion to the table, so that each item in the table has an accordion?

Filepond overflow

Hey, filepond is overflowing and hiding what's beneath Here's the code of the component: ```php SpatieMediaLibraryFileUpload::make('examples') ->label('Exemples')...
No description

Get current item position in repeater or uuid in repeater mutateRelationshipDataBeforeCreateUsing

How I can get the items positions/indexes or uuids in mutateRelationshipDataBeforeCreateUsing() ? I want for each item set some value available inside $state parameter but I don't know which item is currently in mutateRelationshipDataBeforeCreateUsing...

FileUpload randomly fails to upload on Laravel Vapor

I cant reproduce this locally, but on production (laravel vapor) uploading the file somtimes failes. I've attached a video.

Open modal on page load

I saw that it is possible to execute an action when the page is loaded https://filamentphp.com/docs/3.x/panels/pages#opening-an-action-modal-when-a-page-loads There he gives the example of passing the action through the url
/admin/products/edit/932510?action=onboarding
/admin/products/edit/932510?action=onboarding
...

Change order of top bar icons

How do I change the order of the icons in the top bar? To be specific about my case, I have the following order: search bar :: language switcher (plugin) :: database notifications icon :: default menu icon...

alignment in panel

Hi, i'm writing just because i'm going mad on this for a couple of days. Basically for a resource table I have created a panel in it with 3 split and 3 stack (like the screenshot in attach). The two green rectangle are the stack aligned to the center of the split column. What i'd like to archive is to align both green rectangle to the top (like the black one). Reading the docs i see that Stack support this: ```...
No description

how to upload image from an external link?

is there a way to upload image form an external link?

RelationManager - how to control what columns display back?

How can the search functionality display additional information? When I'm searching I am searching across both a name and a number, but just the number (which is what is going to be associated) is shown. I would like it to show both - like an employee number and first/last name.

Searchable select returning invalid results

As title, when I setup a simple Select component like below, it is returning results that do not match the query string? Select::make('customer_id') ->options(Customer::all()->sortBy('name')->pluck('name', 'id')) ->searchable(['name'])->required(),...

How to get all options from table filter in table header action?

I've created a custom filter form for a table on a relation page (i.e. a class which extends ManageRelatedRecords). I have a Select component as part of the filter form and this is populated with a list of projects. Within a table header action, I'd like to retrieve the list of projects (i.e. Select options), in order to provide navigation to one of the projects in the list. Unfortunately, I'm struggling to access the Select component, so would be grateful to be pointed in the right direction. ```php...
Solution:
I've finally managed to get hold of the list of Select options. I had to modify the creation of the project_id Select component slightly by adding ->key('project') . Then, in the header action, the following code gave me an array of the options... ```php Tables\Actions\Action::make('next-project') ->action(function (\Livewire\Component $livewire): string {
$filters = $livewire->getTable()->getFilters();...

Enable Flare JS error logging

I would like to integrate Flares client side JS error logging (https://flareapp.io/docs/integration/javascript-error-tracking/installation). The problem is that I cannot link to Vite assets in Filament because that will create a circular dependency. ```php FilamentAsset::register([...
Solution:
This fixed it for me: ```php <?php ...

Route not defined ...cluster issue?

Good evening I started off with a navigation group called 'Finance', which I then later decide I wanted as a cluster. I built a cluster called 'Finance', moved the resources and undid the navigation group settings....

Where should I put modal?

I am new and curious abot where i can put modal such as Action::make('updateText')->forms blah blah into form? table? filters? or actions where actually?

Timer on a Form

Is it possible to add a timer and then kick the user out of the form if the time passed that timer?
Solution:
It is possible, but it doesn't exist. This is more a livewire feature: https://codepen.io/andychukse/pen/XWQmQXj Simlar should do, and just place it in a render hook....

multi-tenant: It doesn't filter everwhere

I'm a newbie at Filament, but have the basic many-to-many relations in my tables working and in the UI. Now I've added multi-tenant, and have it working in the UI for my Resources by including this in the top of each Resource Class: protected static ?string $tenantOwnershipRelationshipName = 'team';. This works well when I am into the UI for reach Resource, but when I am on the default Admin page and have added widgets with this code, it seems to ignore the multi-tenant filter. Or maybe I need to add a Global Scope to filter it? This is the code that is not filtering (eg. shows all records) - any clues?:...

Pros/Cons in using Resource class vs *Record classes

I'm curious what the best practices are around, for example, using form() in ThingResource::form versus CreateRecord::form? (also, table(), etc...) My ASSUMPTION is that when you have a relatively simple application you can just leave everything in the Resource class, but if your application is more complex, you can break it out into Pages for easier management. Is that correct? Which leads to a second opinion question: If I use the *Record classes one resource (versus the monolithic Resource class aproach), should I do that for all resources to maintain consistency?...
Solution:
I would stick to the resource class unless your create and edit forms are that drastically different. Keeps from having to repeat the fields. Most of the field modifiers accept callback functions which get the create or edit $operation injected so if it’s only like one or 2 fields you can manage it in the resource class. For example:...

Confused on how to handle sorting in Filament and Laravel

I am rewriting, a old application that reuire the sorting of record both for full table or in groups like categories and subcategories so far i looked at this package : https://github.com/ninoman/laravel-sortable/tree/master and this package from Filament: https://filamentphp.com/plugins/ibrahim-bougaoua-sort-order...

weird question - dynamically generated tailwind config file after form submission

So I have a cms where you can set global styles (not impacting my panels) I created a dynamically generated tailwind command that runs after form submission, but that won't impact the front end since it needs to run npm run build or have watch running, is this a terrible idea or is there a way to do this?