Filament

F

Filament

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

Join

Register Filepond Plugin

There is a similar post here : https://discord.com/channels/883083792112300104/1151432989276913674 Is there a way to register a plugin for FileUpload without overriding the whole thing? I've tried all the solutions mentioned in the above thread - except for the suggestion to override the entire file-upload.js file....

How to Get $get an input that is in the main form from the ->createOptionForm modal

Context: I have a form to create a payment where you select a subscription year. Then you have to select an existent subscription (based on the subscription year). If there is no subscription, you can create one in the modal (I've used the ->createOptionForm method to achieve this). For a subscription to be created, you have to select a subscription year. Because you've already selected it in the process of creating the payment, I would like to Get $get it automatically. How do I achieve this? How do I access the subscription_year selected in the main form?...
Solution:
I think this is also possible with $livewire->data[]

How to change the resulting json for Checkbox List?

Currently I'm trying to use the checkbox list field https://filamentphp.com/docs/3.x/forms/fields/checkbox-list However it save the resulting json as something like this, notice item-2 is not inside the array as it is not checked...

filament:upgrade causing asset changes in certain dev envs

I am working on a project where running php artisan filament:upgrade on a fresh git clone works without issues. However in one dev env, running that results in file changes to the published assets in /public/. Normally I would only expect for that to happen after a composer update but in this case only composer install was run. Has anyone ever experienced this problem under certain Windows local dev environments?

Dynamic Modification of the Administration Panel Based on User Settings

Hi everyone, I'm working on a project where I want users to be able to dynamically modify their admin panel. The idea is that they can change all possible attributes (colors, brand name, navigation options, etc.) through a settings page. These settings will be stored in the database. Does anyone have experience or suggestions on how to implement this efficiently? What patterns or practices do you recommend for dynamically loading and applying these settings in the panel?...

hintaction location on infolists

Anyone point me to any guidance that will help me work out how to move the hintaction on infolists. They are positioned on the right far side of the column. I want to get them adjacent to the label. Thanks...
Solution:
I think css would be the only way to adjust this.
No description

How to remove {tenant} for a Filament Livewire page.

Hello! I have a filament livewire page that uses Filament Forms. I don't want the tenant id to be in the url. How would I go about this?...

Spatie Media Library grid columns

Hello, is there any way to change the number of columns using the SpatieMediaLibraryFileUpload component, this is the code I got: SpatieMediaLibraryFileUpload::make('images') ->label('Images') ->multiple()...
Solution:
Only way to adjust this would be with css.
No description

Action that opens a modal, where there are buttons that take you to other modals

I'm working on a modal, where inside it there are 2 buttons that take you to different modals. I'm using extraModalFooterAction to make my buttons to open the modals, I managed to open them, but when I fill everything in both modals it's not saving my data, I used cancelParentActions but I realized that it literally cancels my entire previous action, what can I do?...

Move Header Actions to Footer

Is there a way I can move the header actions of edit resource page to footer? I want to swap the positions of save/cancel with the header actions....

Counting relationships

I have a simple relationship between an Entry and a Jockey. class Entry extends Model { public function jockey(): BelongsTo...

Reusable component with multiple form input fields

Hey Everyone, I’m trying to figure out how I can create a reusable component that I can use on multiple resources without having to type the same items over an over. I want to create a component called “Link” with the following fields....

Auto delete files when deleted in FileUpload component

Hi all, I'm using the FileUpload component a lot and even got it to work properly on DigitalOcean Spaces, which is awesome! However, I cannot find an easy solution or configuration option for the component that deletes files from the storage when I delete a file in the component and save the record. Did any of you face this issue? How did you solve it if you did?...
Solution:
Found a solution tonight. I've created an Observer and have used the isDirty and getOriginals method to find which files would need to be deleted on the 'updating' and 'deleted' event. Then used the Storage::disk('local')->delete($file) code.

How to pass data to an EditAction

I'm struggling to make the editAction to recieve the record where I call the action in the livewire blade component In blade i have : {{ ($this->editAction)(['record' => $menu]) }} ...

Validation for custom page

Hello everyone i have a case where when time is filled with value interval start_date and end_date must be filled how i can add validation for this case
Solution:
What about min date? ->minDate(fn($get, $state) => $state)...

Display breadcrumbs and title of the page in topbar

Hello, I need to display breadcrumbs and title of the page in the topbar. It works like a charm on list pages, but as soon as I go on a Edit ou Create Page, I got this error: Using $this when not in object context. ...
No description

Lower payload size

Hey, I have a table with 43 columns. Currently, loading 25 rows shows 2.35 MB in the network tab. When I comment all of them out, I get approx. 300 kB for that table. Is there any way to minimize the size? There are no crazy columns (no images etc.), just text....

Getting "Detected multiple instances of Alpine" and not sure on how to attack this issue

Hi! I use Filament for my admin via the panel builder which is superb. I now started to use the table builder for one component in the frontend of my application. I now run into an AlpineJS conflict and not sure how to attack this. In my footer I have @FilamentScripts...

Passing JSON key to $wire.updateTableColumnState, in a custom column

Hi, i'm having trouble to replicate something i did with a toggle column, with my toggle column if i did it like this ToggleColumn::make('itens.'.$key.'.Delivered') It would change the value correctly, but i need to iterate thru a whole json, so i made a custom column but in the method updateTableColumnState() if i try to the name with a key, it doesn't change anything nor throw a error...
No description