Filament

F

Filament

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

Join

session message

I need to throw some exception that will be handled in the admin panel and on the site. I juas want to redirect back with session message, like that: ` $exceptions->render(function (ExternalServiceException $e) { return back()->with([ 'error' => 'error...',...

Confirmation modal with summary of data filled in the form

I have a large modal with a wizard to fill in the fields. I need a confirmation modal to be displayed when registering the record, but showing the data filled in the form, for the user to accept or reject the registration. Is this possible?...
No description

Need a help in custom page with table

I created a ViewDayBookDetails custom page : class ViewDayBookDetails extends Page implements HasTable { use HasPageShield;...

FIlament Bulk Delete causes this.$refs.modalContainer is undefined

Watch attached video: Trying to delete record or records causes this error and I have no idea why this.$refs.modalContainer is undefined. The modal for approving deletion gets triggered in background, you can see it, but something falls off and I have no idea where to even begin with this.

Use API authentication in Filament

Hi, I have a project with an API (sanctum tokens) and a panel in Filament. I would like to login with the API and continue the session in Filament. Front consuming API and Filament panel are in the same domain, different subdomains. What could be the best approach to do that? Thansk...

Need two tabs with two different tables with two different models on one page

Hey guys, I have this request: I have two models: Intervention and InterventionRequest. I have InterventionResource that has ListInterventions. I need on that page have tabs for Interventions and Requests. Each tab will have each own table for that model. How to do that? Should I create custom page?...

How to keep footer hook stuck at the bottom

footer in render hook will never stick to to the bottom and i don't know why?
No description

403 Forbidden in Production or Staging with FilamentPHP

APP_ENV is set to local, I can access the admin panel without any issues. However, when I switch to APP_ENV=production or staging, I get a 403 Forbidden error when trying to access the admin panel. I have already defined canAccessPanel() in the User model to always return true: public function canAccessPanel(Panel $panel): bool { return true;...

how can i make a table collapsible, keeping filters intact ? as i have a footer chart widget.

I have a table, table filters are displayed above table, and a chart footer widget, chart data is controlled along with the table filters, now i want the table to be collapsible

How do I use actions on a ViewRecord page?

Hi, I've created a custom ViewRecord view for my resource with a section showing several buttons and actions. I've created an action that should open a modal with a form. The action is rendered correctly but when I click, I see the spinner and nothing happens (0 console or PHP errors). Here my ViewRecord (without all stuffs) and a dump action : ```php...
Solution:
Do you really need to overwrite the view? Header Actions don't fit for your use case? Regarding the action: The action name and the function must match. In your case the function should be named testAction()...

Retrieve data from a custom Filament\Actions\Action

In my action I've got a custom view: ``` <x-filament::dropdown.list> @foreach ($getOptions() as $key => $item) @php...
Solution:
Ok. Should have used $arguments: ``` PublicationStatusAction::make('status') ->action(function ($arguments): void {...

Dashboard widgets

Hi all, I've been making a dashboard that has lots of stats. Ideally I want to create an individual widget for each stat so that I can create a layout manager and users can shuffle them around etc. However, there seems to be some limitations in the way that the widgets are laid out in terms of columns. Ideally I'd like 6 columns but this just doesn't seem possible. The layout gets messed up (similar to this question on Stack Overflow: https://stackoverflow.com/questions/79090899/filament-widgets-grid-and-stats-overview). ...

Adding edit and delete actions to items of a RepeatableEntry

i have a RepeatableEntry that loads items of a ticket topic: ```php return $infolist->schema([ RepeatableEntry::make('items') ->label('')...

Repeater with ActionGroup in extraItemActions

I am working on a repeater where I want my users to have a dropdown for multiple actions. Whenever I add ```php Repeaer('consignments') ->extraItemActions([...

Export download file not found on server

I'm using Filament built in Export feature for exporting select records. It works fine as expected locally. But on server, when I try to download file from notifications, its 404 not found. Anyone facing the same issue? Where can I start debugging it?...
Solution:
Indeed local disk was the issue. I switched to s3 and its started working.

Delete button

Hi everyone! I'm new to FilamentPHP and I'm trying to add custom "Edit" and "Delete" buttons to my table. The "Edit" button works perfectly, but the "Delete" button isn't functioning. I'm using the default mountTableAction('delete', '{$record->id}') method for the delete functionality. Here’s the code for my custom delete button: ``` $deleteButton = <<<HTML...
No description

Generating Current View for PDF

Hi, This is kinda part of filament from my point of view that's why i decided to ask here if anyone knows solution. I am trying to develop action from filament, which will generate PDF from current view....

Get current row in castStateUsing ImportColumn

Is this possible inside the closure? I need to change the state of one column based on another column.
Solution:
Solved with: ```php ->castStateUsing(function (?string $state, Importer $importer) { // $importer->getData()['ID']... return $state;...

favicon not being displayed

following the docs https://filamentphp.com/docs/3.x/panels/themes#adding-a-favicon i tried changing the favicon but it displays the default globe, even do the same asset path being used outside of fillament displays the png correctly on a blade file, any help? file size 14kb using in all panels ->favicon(asset('assets/images/logo.png'))...
Solution:
Oh hi, i fixed by changing the default favicon.ico from the public directory.

Its possible to make a table layout for mobile devices and a layout for larger screens?

I am currently looking at the documentation for Layout Table builder but I cannot create two different layouts. On large screens it appears like on mobile.