Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

Filament v4 action modal, inside action modal

Hello, I'm having an issue displaying an action modal inside an action modal, for some reason the child modal seems to be getting height from parent modal so on my relation manager i have a custom column set like:...

Form and Table in Custom page Filament v4

How to use form and table in custom page in filament v4

Missing styles on form within livewire component

Hi All - Hi there. This is for Filament 4 and Laravel 12. I am attempting to use a filament form in a custom livewire component that is not within a panel (basically a public registration form). I was able to successfully create the form using php artisan make:filament-livewire-form RegistrationForm and the fields display when I hit the route. The issue I am having is that I am not seeing any styles. I have re-ran npm build several times and made sure browser caching is disabled. layout file is pretty basic:...
Solution:
Did you add this to your app.css? ```css /* Required by all components */ @import '../../vendor/filament/support/resources/css/index.css';...

Set temporary upload disk per-FileUpload field

Hi. Does anyone know how I could set the temporary upload disk on the FileUpload field itself? I need to leave my Livewire temporary_file_upload config set to a local disk, but save temporary uploads direct to S3 for a few specific forms. Cheers.

Refresh sidebar doesn't work

For my sidebar navigation item I only want to show the badge when a certain condition is true. I specified that condition in the Settings page class. When I try to refresh the sidebar on form save, this doesn't do anything. Any idea's on why this doesn't work properly? ```php...
Solution:
Dispatch the event from afterSave()

Select filter with distinct values of an related table

I’m using Filament 4. I have two tables/models: - incoming_invoices (belongsTo holidayWeek) - holiday_weeks (hasMany incomingInvoices, contains an integer year column) ...

Light / Dark mode blue

Using filament 3 on a custom page the light mode looks blue when the OS (iPhone/Android) screen is in dark mode If I change to dark mode in filament it looks ok The problem is when I set filament on light mode...
No description

Why do I get an error when redirecting from outside Filament? (but not when I redirect internally)

When I redirect from any laravel page using
return redirect()->route('filament.manager.pages.dashboard');
return redirect()->route('filament.manager.pages.dashboard');
, the page loads but it looks wonky. All of the css is loading and there's no errors in the network tab. But, the console shows a whole bunch of errors: Alpine Expression Error: Cannot read properties of undefined (reading 'isOpen') Expression: "! $store.sidebar.isOpen" ...
Solution:
This was caused by the request that sent the user to my route being done by wire:navigate

Does something happen with columns?

Hi guys, I just updated project and noticed that now ->columnSpanFull() is not working correctly for me anymore. When I change it to ->columnSpan('full') it is working correctly. Should I replace it in the entire codebase or it is just a bug?...
No description

How to work with file uploads

HI, i am implementing file uploads for the first time and I am facing 2 problems: 1. after uploading the file and clicking save, it loads indefinitely (see screenshot) even though I can see it's been uploaded to my disk and it's filename saved to my DB. 2. When I reload this page, the file upload is empty again I'd like for it to show the already uploaded file so the user knows a file exists already. ...
Solution:
figured out the other issue, turns out my column was set to hidden on my model
No description

Resource/Page stubs removed in Filament v4 – best practice for custom commands?

I’ve noticed that in Filament v4, many of the stubs that existed in v3 are no longer published. For example, in v3 we had: * Resource.stub * ResourcePage.stub * ResourceEditPage.stub...

Upgrading to V4

I'm having problems with upgrading to filament 4 specifically because of the plugins, they are supporting it but still gives issues, also i was using tw3 and upgrading it breaking the filament views. I've decided to rebuild the whole project again and then merge it with my main repo after I'm done. Is that a valid approach, I know it consumes time but i felt like fixing all bugs and upgrading it will take longer time.
Solution:
I've rebuild the whole project, didn't face any issue, I just had to rebuild a plugin called Advanced Filters

Error saving media file with spatie-laravel-media-library-plugin

Hi, I have installed the spatie-laravel-media-library-plugin plugin in my project. I've done the setup following the instructions of the plugin. However, when trying to save a image in below input I get an error which I can't seem to figure out. SpatieMediaLibraryFileUpload::make('featured_image') ->label('Featured Image') ->collection('pages')...

Select bug: after creating a new record, child select stores the ID but loads no options if searchab

I’m running into a bug with Select. I have two selects: subfields.0 (parent) and subfields.b (child that depends on subfields.0). When I create a new record in subfields.b using createOptionUsing, the new ID is correctly placed in the form state. The issue is that if subfields.b has both searchable() and preload() enabled, its options list becomes empty right after creation.

Show modal instead of toast after CreateRecord in Filament v4

Hi! 👋 I’m building a CreateRecord in Filament where I generate a Passport Client. In the handleRecordCreation() method I get the client_id and the plainSecret (only available right after creating the client). Currently, I’m displaying these values in a toast notification using getCreatedNotification(), but instead I’d like to show them in a modal (so the user can easily copy them)....

[Filament Spatie Media Library Plugin] fallback url not displaying on SpatieMediaLibraryImageColumn

What I am trying to do: I am trying to display the default avatar on SpatieMediaLibraryImageColumn. What I did: I added a fallback url in my registerMediaCollections() definition....
Solution:
Updated both Filament and the plugin from 4.0.0 -> 4.0.15 (idk which of them fixed it)
No description

Free and Paid Resources

I want to restrict navigation resource like below use-case, where free/paid can have options Use-cases: 1. When any user login, they should see all resources in navigation 2. If not subscribe, auto redirect to free resource when logging in...
Solution:
I tried to quickly create something, and ended up with this: use resources as regular resources, but then add global middleware to redirect to locked page
No description

In a RelationManager, how do I show the headerActions when the record owner is in view page?

I don't think there's anything more to explain. I'm looking for something like' visibleOn(['edit', 'view']) ', which is usable on fields.

style isn't applied in blade

i have a simple ViewField usage in my form
php
ViewField::make('transcript_path')
->label('Transcript')
->view('filament.resources.scholarship-application-resource.document-link'),
php
ViewField::make('transcript_path')
->label('Transcript')
->view('filament.resources.scholarship-application-resource.document-link'),
...
No description