Filament

F

Filament

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

Join

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?...
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:...

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

badge in global search

Any chance I can use badge in Global Search? ```php public static function getGlobalSearchResultDetails(Model $record): array {...

New tailwindcss classes not bundling in new blade files

Wondering what I'm doing wrong. I have composer dev / npm run dev running, and created a new file: resources/views/livewire/application-nav.blade.php...
Solution:
to include new classes you need to build a custom theme first

Filament 3.x: How to open a modal from blade template

Hey together I have a modal within a livewire component which is build with Action::make('something')->form(...). At the moment it renders a trigger button which opens the modal. In a special case i need to open this modal dynamically on page load. How can I achieve this?
Solution:
<div wire:init="init">
@if ($isAdmin)
...
<div wire:init="init">
@if ($isAdmin)
...
...

Odd issue with form select on virtual column

So I have a virtual column in my orders model defined as below: protected function TitleAndID(): Attribute { return Attribute::make(...

Select and media upload not loading and working correctly

I’ve built an admin panel using Filament, Filament Forms, and Spatie Media Library Upload. However, I’m encountering issues in production where two of my components are not loading correctly, and I’m seeing multiple AlpineJS errors. Strangely, everything works perfectly in my local environment. Issue: When using Filament Forms and Spatie Media Library together in production, two of my components fail to load correctly, and I see numerous AlpineJS errors in the console. ...
Solution:
@Leandro Ferreira The problem has been solved now. I did not have the correct filament javascript files in my root folder.
No description
Next