Filament

F

Filament

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

Join

Implemented a custom login / registration am I missing any obvious security issues?

So I needed a very custom registration/ login for a project Basically a password less + social login and a multistep registration work flow After tying a bunch of stuff my solution was to do a custom login / registration form in blade / livewire. Then use admin panel middleware to make sure the user has completed the required registration steps before accessing the panel....

Badge disappear

I have a badge embedded to a Tab component, by default there is a badge content of 1. However, when I update one of the fields that has auto save after update, the Tab badge will disappear. If I refresh the page, the badge appears. May i know how can I make the badge persistent?...

Issue with RichEditor

I use filament for my resources, the rich editor in one of my posts is like this: And I can't click anything or change anything, its like this for both new rows and existing rows, it was ok before but suddenly like this !...
No description

Upgrade to latest Filament and Latest tailwind 4, now in filament admin Vite error:

Unable to locate file in Vite manifest: resources/css/filament/admin/theme.css. Does filament have its own manifest file? I did have that theme.css file but still get error and regular laravel vite manifest has no reference to this file....
Solution:
@neonos, you can in fact continue to use Tailwind CSS v4 in your Laravel application when you’re only using Filament for your admin panel. I just published a guide on how to install Tailwind CSS v3 just for Filament so you can use both Tailwind CSS version 3 and 4 side by side. If you have any questions, I’m more than happy to help you in this thread 😊 ...

Serve forms from controller

I'm building a process where creating an order will need to serve multiple forms in stages and then save the data each time along with the step number so they can go back to the order. Depending on choices different forms will be served. In ordinary PHP I would have a controller to do the selection of forms and data processing. Can I somehow do that but serve filament forms instead of normal html forms and return the data after completion?...
Solution:
So you add the form to a component, depending on the step will depend on the schema it loads in, the schema could be array return functions within the component.

Opening modals on page visit

I have several modals in my resource (FilamentComments, a custom 'relation manager' in a modal etc.). Is there a way to have a particular modal opened on visiting the edit page? Or having a table row action which opens the edit page with an opened modal?

collapsible bar

How do I make my Filament app's collapsible bar not hide the logo, but only the resources I've already created? I need to remove it from the navigation bar...
Solution:
The logo area is part of the sidebar area, not the topbar. Only way to do what you want is to override the page view component. But that is strongly not recommended.

Question about table animate-pulse

I noticed that when I was navigating between pages or increasing page length I wasn't getting any processing feedback from the UI. I looked to see that the table component is using the animate-pulse class if $records are null, but for me this is only true on the initial load if I'm using deferred loading. I checked the v2 table component and while it's a bit different overall, I applied a similar logic to add the animate-pulse class using wire:loading.class and that seems to work. I feel li...

Relation BelongToMany not working when Group in table.

I need help, I created a table with a model that uses belongToMany on the table, for TextColumn it can be displayed, but not for grouping, and also can't select checkbox for its grouping data. Has anyone succeeded in using it? this is part of the code I created: return $table...

Passing data to a custom page that includes the Filament menu system

Situation While the majority of my single Admin panel works well in Filament, I need a report writer that allows users to select fields and build their own reports. Since I can't find this in Laravel/Filament, I want to use a non-Laravel Class I wrote and port it. So I need to create a page that has my Filament menu but allows me to write typical Controller code that passes values into a generic View that's built to display a report. Trying this method I'm trying to use the Pages doc (https://filamentphp.com/docs/3.x/panels/pages) in Laravel 12 w/ Filament v3 using php artisan make:filament-page I have created a working page that also has the menu on it....
Solution:
I've got it working. That page above was immensely helpful - thanks again!

Pagination on a page class?

If a page class is just a livewire component under the hood, why can't I use pagination? I just have a foreach loop of items I want to paginate and I can't seem to get pagination to work right. ChatGPT says filament doesn't support pagination on a page class outside of a table. Not sure if that's accurate or not, but I can't seem to get it working.

always filter?

I am creating a page, but the only items from the db should have a boolean flag checked. I tried adding a filter, but that only put an optional filter at the top of the table, I need to always filter by this boolean column, can it be done?...
Solution:
You are looking for: ->modifyQueryUsing()...

Import XLSX / CSV

Is prebuilt actions works with both xlsx and csv format? If not, then is there are any plugins which works with both? I've tried installing konnco/filament-import but which is throwing an installation error for filament V3. Thanks....

Getting screen size inside filamentphp?

hello, so i'm trying to make filamentphp usable on mobile, obviously filament being a legendary framework and all that, already had Split and Stack made for this purpose. but there's only one problem, whenever i use Stack and Split, it removes the table headers, which is understandable considering how table works but it doesn't look good at all. so i had an idea, if i make a function that returns a list of columns, it returns a list that has no Split/Stack for wide screens, but returns the mobile-friendly columns on smaller screens. the only problem is, there's no easy way to get screen size on php, i was thinking, is there any filament helper that could potentially make this easier?...
Solution:
i look at this problem a different way, instead of using screen size to determine if the user is using mobile or wide screen, i just decided to use useragent and check if the user is mobile with this package https://packagist.org/packages/jenssegers/agent...

pages are not showing in the panel

What I am trying to do: i am trying to acces to page via the admin panel What I did: i addded a new page for crud tasks My issue/the error:...
No description

Indirect modification of overloaded element of Illuminate\Support\Collection has no effect.

I am currently working on a bug where clicking on the 'save and new' button inside a 'create a new room' form, the user receives the following error: "Indirect modification of overloaded element of Illuminate\Support\Collection has no effect”. I believe this is due to filament trying to modify a collection directly while it’s in a state that doesn't allow modification." This looks like it is due to filament trying to modify a collection directly while it’s in a state that doesn't allow modification....

In resources, where do I put database queries that I only want to run once?

The ->hidden() method runs 5 times per row in my app, and that seems to be the default with filament. I really need the result of it to be based on a user permission, but that would mean fetching that permission lots of times when I don't need it. Is there a place in a resource similar to mount where I can load something once and access it?...
Solution:
Not a great idea but you may just load it insude the table method as a variable as long as it isn't needed for the resource class itself

Using a filament theme without frontend-scaffolding

Hello, I am working on an api only laravel app, for the api I am using filament manage my api. Altough did notice issues when installing a custom theme (specificaly this one https://github.com/Fa-BRAIK/dash-stack-theme). I am getting the error: "Vite manifest not found at: E:\Development\Api\public\build/manifest.json " I do have vite installed on the project, but I am not using any frontend scafholding, so I can't build the vite application to get rid of the error, what should I do? (Not sure if this would be the right place to ask?)...
Solution:
I guess you need to create a Vite config file that references vendor/nuxtifyts/dash-stack-theme/resources/css/theme.css and compiles that

Table row record action combined with expandableLimitedList unexpected results

Hi all, When I have a table with a view / edit action that is used by default when you click the whole row, the expandableLimitedList doesnt work as expected. When you click the "show x more" link to reveal the rest of the limited list, the view / edit action is triggered instead as it doesn't distinguish this separate link from the whole row click. Anyone else experienced this and have a solution?...