Filament

F

Filament

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

Join

Best Approach for Service History Search: Dynamic Data or New Table?

Hi everyone! I’m building a vehicle workshop/garage application using Laravel + Filament and have the following resources set up: CustomerResource...

validation in importer

Why do i keep getting this error? "The name field is required."
ImportColumn::make('name')
->requiredMapping()
->rules(['required', 'string', 'max:255']),
ImportColumn::make('name')
->requiredMapping()
->rules(['required', 'string', 'max:255']),
...

How to inject script in tables

how do you inject a script in table resource (not custom) so that table action can interact with it like dispatching an event?

Import external CSS after Filament’s theme CSS

I’m loading a few external CSS files using FilamentAsset::register() and Css::make(). This is importing such files without but when I check the generated HTML, these external script are included before Filament’s theme CSS files. The external CSS applies particular styling to elements such as inputs in particular views of the application but Filament’s CSS rules are overriding them. I want to load the external CSS after Filament’s. Tried looking at the docs and source code but couldn’t find anything related to this....

How to load different ListPage based on permission on multi-tenant resource?

Hello, I am using multi-tenancy on my Filament Project and using Spatie roles and permissions. I am trying to load different ListPage on my resource based on the permission as you can see in the code below, but the getPages() doesn't recognize Filament::getTenant()->id which is causing the problem to check for the permission for the authenticated user. ```...

Can't preview an image with 'private' disk when using spatie-laravel-media-library-plugin

Hi, I have field like this ``` SpatieMediaLibraryFileUpload::make('business_license') ->collection('business-license') ->disk('private') ->image() ->visibility('private') ...

Stats widget above the table linked to the table data

Hello, I have added this DashboardTable widget in my Dashboard and added the filters to search. I am looking to add some stats at the top of the table from all the paginated results and those stats should be linked to the search filters used in the table. Please let me know how to do that?...
Solution:
use this in your table widget ```php public function updated(string $name, string $value) {...
No description

How can I resize image with a `.webp` extension? It is saving as `.jpg`.

I'm trying to resize an image with the .webp extension using FileUpload, but the file is being saved as .jpg instead. Here's the code I'm using to handle the file upload and resizing. Can anyone point out what I might be doing wrong? ```php FileUpload::make('medium') ->label('Medium Image')...

Custom page with relationship manager

I have a resource set up for schools which shows the school info in an infolist. There are relationship managers for the classes, teachers, and school board on there. I'd like to add a custom page for My School in the menu that would show the user's school exactly like the page for viewing the individual school on the resource. I've managed to make a custom page with the infolist but not the relation manager part. Is there a way to use a relation manager page on a custom page? Or is there a good way to make this work just in the School Resource? I'd prefer to have the url ending in something like /my-school instead of /schools/{id}....

table action not showing

Do anyone encounters filament actions(ViewAction, EditAction, DeleteAction) modal not showing up?

RichEditor is removing inline styles

I got html in database, for example:
<p style='margin: 0 0 35px 0; padding: 0; font-weight: 400; font-size: clamp(40px, 2vh, 54px);line-height: clamp(40px, 2vh, 54px);letter-spacing: -5%;color: #000E5F;'><span style='color: #25AAE9;'>Who</span> <strong>We</strong> Are?</p>
<p style='margin: 0 0 35px 0; padding: 0; font-weight: 400; font-size: clamp(40px, 2vh, 54px);line-height: clamp(40px, 2vh, 54px);letter-spacing: -5%;color: #000E5F;'><span style='color: #25AAE9;'>Who</span> <strong>We</strong> Are?</p>
...

Single page to edit settings

Hej there How would you build a single-edit-page to let users edit settings? Usecase: Multi-Tenant App. One User is related to one shop....

jalali calendar

how can i have jalali calendar in my form? i used Mo Khosh but it doesn't work well....

Text on image

Any of you tried to build or know of a package that can have an image, where you can add text fields/blocks, that can be moved around on the image and those positions be saved in eg. json. Im looking into building a membership card designer....

How to Access TemporaryUploadedFile Data from FileUpload

Hi! I’m using the FileUpload component in my Livewire form. I want to access information about the uploaded file, such as its size, width, and height, using the TemporaryUploadedFile. Can someone explain how I can achieve this? ```php...
Solution:
try TemporaryUploadedFile $state

I need customize the login page with two forms, it is possible?

I have an application with multiple panels, and a I need one login page to both panels (like attach image), is possible do it? how can a I do it? thanks guys.
No description

livewire.min.js not found

I build a panel using Filament, it was up and running fine, for this installation I placed the code in /usr/share/nginx/html/panel and nginx site pointed to /usr/share/nginx/html/panel/public. Turns out an IT guy moved everything to /var/www/html, and edited nginx to point to /var/www/html/public. Now the panel is broken, I was checking browser console and it is complaining about a missing livewire.min.js. I need help with this one, I already:...
Solution:
I just realized it when I made a copy to the original location, and the browser console is still complaining about the old route.

Textinput validate convert int to string

```php protected function handleRecordUpdate(Model $record, array $data): Model { dd($this->validate());...

TextFilter

Has anyone managed to make a TextFilter without having to buy the Advanced Filter plugin?
Solution:
To help anyone who needs it, I managed to create the TextFilter class. Now it's much easier to use the filter with a TextInput field. https://github.com/lpcs007/filamentphp3-TextFilter...

Relation Manager Form - Adjust size/width

Is it possible to adjust Relation Manager Form size? Have a big screen and form modal width is about 50% screen width. I have tried to use $form->extraAttributes(['style' => 'width: 100%']) or add custom class the same way, but neither style or class does not appear at form container div....
No description