Filament

F

Filament

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

Join

Store additional data after form submition

Hello, I have this table called student_expenses that is linked to the lessons table. After I submit data to the lessons resource form, I want to add data from the form to the student_expenses. How can I achieve this?...

call component from another component

hi everyone iam new in livewire i want to call the component that used to return the date to show in in my page using another component which is the search bar how to do that shortly

what is Blade Components for rich-editor?

this is right ?
<filament-forms::components.rich-editor wire:model.defer="editingCommentText" class="w-full p-2 border rounded-lg focus:ring-2 focus:ring-blue-500" />...

Live select field not found with $get

In a create form, I have a select field called base_position_id defined as ```php Select::make('base_position_id') ->label('Position') ->placeholder('Select a Base Position from DGP')...
Solution:
sorry, i miss-read where the relationship was. try $get('../base_position_id') since you are in a layout component you need to traverse out of it to get the state from other fields.

Cannot close modal after validation

I have a page that shows a custom column: ` public function table(Table $table): Table {...

Do not show rows with computed data

I have a table with two columns, both are computed values based on some complex queries. Now i need a way to not show these rows if certain computed value which is shown in the table is 0. Is there a way to do this ? For example in my screenshot, i do not want to show those rows where 0.0 is the only value....

Using a FileUpload input in a Custom Page

Hello everyone! I have created a custom page with several forms, all of which work perfectly, except for one. What doesn't work is a form with two FileUploads, one for an article cover, the other for multiple other images....
Solution:
Ok, found the problem 😄 I had to use the imagesData array, and not the getState() method....
No description

Handling Users with No Permissions

I am using Filament Shield to allow the admin to manage user roles and permissions. However, after login, if a user doesn't have permission to access any resources, no 403 error message is displayed, and the user is redirected in an infinite loop to /admin. What I want to achieve is to show a 403 error page when the user doesn't have permission to access any resources. I attempted to create a middleware to check if the user has access to any menu items:...

How to Set FiltersLayout::AboveContentCollapsible to be expaned by default

I need a filter on top of table that can be collapsible, but expanded by default

Nested Resources with manyToMany relationship

Hello! What I'm trying to do: I'm trying to implement a three-level deep nested resources project, where one of the relationship is a manyToMany relationship (ActivityEmployee). ...

Access form data in modal action

I have the following action ```php Action::make('foo') ->form([...

Laracasts Alpine code in an action

Im following a guide on laracasts and im at a point for it has a form component, and has attributes for: x-data, x-on:submit.prevent. I am wondering if I can use a custom action to call the alpinejs function from my app.js file, rather than creating a new blade file etc Bit lost trying to find this in the docs?...
Solution:
probably something like this ->alpineClickHandler('register(xx)')

Separate Tabs

Hi guys, I was wondering if it is possible to separate tabs to have one for status and one for country?
No description

Looping through multiple Livewire components containing Filament Action crashes Firefox/Safari

👋 Hi Filament builders! Context I'm migrating my action modals from Wire Elements Pro (Modal) to Filament Actions to achieve a more consistent UI and reduce code maintenance. ...
Solution:
@Grégoire I've found a solution that works even when leaving the InteractsWithActions. This is a temporary solution, allowing you to space out requests if they're too close to each other. Just add this JS script to your page: ```js...
No description

Change tab name for the relation managers

Hello, I want to change the tab name for the relationship managers shown in the picture. How can I do this?
Solution:
Oh, I figured it out... I added this to the realtionship manager
protected static ?string $title = 'Test title';
protected static ?string $title = 'Test title';
...
No description

use of EditAction in a foreach loop loads all the forms

I am using a Blade template that iterates over elements in a loop. For each element, I load a Livewire component that returns an EditAction allowing the element to be edited. So, I have this in my Blade template: blade @foreach ($sejours as $sejour)...

Register page outside the panels

Hi, I have a problem with register my custom page outside the panels and always got this error:
Unable to find component: [app.filament.livewire.pages.registration-request-page]
Unable to find component: [app.filament.livewire.pages.registration-request-page]
If I insert page into ->pages() property in one of my panels it work just fine, but then I've got this:...

Unable to upload multiple images at the same time

When I try to upload more than one image to my SpatieMediaLibraryFileUpload component it returns a 422 error with the following response
{"message":"validation.uploaded","errors":{"files.0":["validation.uploaded"]}}
{"message":"validation.uploaded","errors":{"files.0":["validation.uploaded"]}}
If I then save it will have saved the first image I uploaded.
If I upload multiple images, one at a time and save the resources between each upload they work fine.
I'm using filament/spatie-laravel-media-library-plugin v3.2.92...

Relation manager many to many at resource create

Hi, I have working relation manager with attaching models/relations with editable pivot data but I'm curious if there is a way to allow attach/pre-attach or something at create page? I have delivery methods available in my app and user can create delivery prices where they can add name, select delivery methods and set their prices. It would be awesome to get this at create page instead of require save first with just a name and only then add delivery methods and prices....

Modal does not show close button by default, on custom columns

I have a page that shows a custom column: `public function table(Table $table): Table { $user = auth()->user();...