Filament

F

Filament

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

Join

TODO / Checklist App

Hi, I want to create a TODO / checklist app. Users should be able to create checklists and add items to these checklists. The items can then be checked off one by one to mark them as completed. What kind of components or elements would be suitable for this? I’ve tried using a repeater, but it doesn’t look very user-friendly.

afterStateHydrated -undefined Method

I just want to make my web have a Map Picker Feature. Im using afterStateHydrated to get my latitude n longitude. But, the 'afterStateHydrated' method is undefined, btw I follow a tutorial and no error in that tutorial, and idk why my app is still work with that error still there. Anyway, I dont have muck experience in laravel and PHP. ...
Solution:
Okey this is just an IDE error? If your app works than it's not a problem. Maybe adding https://github.com/barryvdh/laravel-ide-helper can help with this kind of "errors".

Route [login] not defined. How to fix?

I have my Filament 4 app pointing to the root DIR. When ever something tries to redirect to login I get that error. And apparently when I try to use the filament login as a route I get an error saying 'filament.app.auth.login' doe not exist. ...

Table tabs with custom content does not load content on first tab click

What I am trying to do: Showing courses with custom content & tabs. When clicking on a button I expect different courses to show. My issue/the error: When I click on a tab, the URL changes but the content does not change. When I press the same tab again or refresh the page, the content does change....

How to get fields from One to One relationship?

I got my migrations sort of setup similar to this laravel daily guide: https://laraveldaily.com/lesson/booking-api-laravel/profile-fields For example in patients migration i got this ``` Schema::create('patients', function (Blueprint $table) {...
No description

Is it possible to custom divide the panel?

Can I build it like in this image? Thank you!...
No description

Custom theme is not visible

Hello there, I created a custom theme like the docs said. My theme.css does exist, I added it into the vite.config.js and run npm run build. ...
No description

FileUpload form field and it's default values

Hello everyone. I have a problem with FileUpload form field on my custom page. I get a record from secondary db with file position and i want to show it as a default value for current form field. On this moment I made a default filament 4 resource with linked field from db to the FileUpload form field. In result i have seen that db contains name of file and edit page shows that file as already uploaded. In thay case if i set default value as array of strings with filenames/position of the file in storage/app/private. But then i tried to made same form with same default value on my custom page then the file not appears....

Set default export directory

How can I set the directory for my exports? I'm using s3 but everything is going to filament_exports/ I want to change this to something more custom.
Solution:
Ended up creating a custom Export model ``` <?php ...

Is there a way to determine when a user clicked on a URL (TextEntry)

Hey there. I would like to know if I can somehow determine if the user clicked on the URL when using a TextEntry::make()->url()...

AttachAction and EditAction share modal form / wrong form appears after cancel

Hi everyone 👋 I'm having a strange issue with a ManageRelatedRecords page (Filament v3, latest). The relationship is Assignment -> properties (many-to-many with pivot table assignment_properties). When I:...

Validation Message needs to refactor

I am using FileUpload method from the #filament, but getting this weird error message, I had applied Handler, getValidationAttributes() & getValidationMessages(), but none of them is working. Can someone help me to resolve this one? #laravel V11.31 #filament V3.2 #livewire V3.0 // custom messages...
No description

Tell Filament to refresh navigation badges

I display my navigation badges using: ```public static function getNavigationBadge(): ?string { return Cache::get('navigation.vetting_photos.label', '…');...
Solution:
Should be $wire.$dispatch('refresh-sidebar')

How to debug in Filament

Hi guys need a little help , I have a custom resource to select which subjects are going to be taught in a class So i created this checkbox field which loads options depending on which pattern/syllabus was selected...
No description

Table builder render hooks - scope not working

I'm trying to add a scope to the table render hook (TablesRenderHook::TOOLBAR_AFTER,) , apparently it's possible. In scope I tried to pass ExampleResource, Pages/ListExample or Tables/ExampleTable and nothing works. Works without scope.

How to show a hidden field of a related model in a Fieldset

I have a Fieldset::make()->relationship('user')->... and one of the fields on the User model is hidden by default (e.g. is in the $hidden array) that I want to specifically make visible to a Filament view/edit page. I don't see a modifyQueryUsing method or anything similar so I'm wondering how I can modify the query to make that field visible. Is this even possible?
Solution:
Ok, it's not pretty but the solution I came up with is in the form() method of the resource, I just do this: ```php /** @var Person $record */ $record = $schema->getRecord();...

Select field UI bug

Happen on a repeater
No description

Mount Existing Table Action From View Record Modal

What I am trying to do: Mount a table action from the record view modal (record clicked and opened from said table), using a hintAction which sits above the form fields. The table action is named 'mark-ledgered'. This action works correctly when clicking the action from the table row itself. What I did: The below code worked in v3. I have attempted to replace the replaceMountedTableAction with replaceMountedAction and mountAction to no avail (changing the params as required). I have tried using a prime component (text) with a htmlString button/JS to mountAction via wire:click but this does not work either. My issue/the error: The modal is not launched/replaced like in v3. Nothing happens....

Using suffix/prefix actions with TextEntry in an infolist doesn't work if the state is empty.

I wanted to create a button/modal to add information when the state is empty. I ended up with a workaround by creating 2, one with action()/placeholder() and one that shows the information with visible/hidden to alternate them. I dove into the TextEntry class and it bails before adding affix actions. I'm wondering if this is by design or just an oversight....