Filament

F

Filament

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

Join

Navigation Menu testing

I want to test, if my navigation menu item is visible or not. Currently I am relying on this code snippet ```...

Checkboxlist relationship with additional column

CheckboxList::make('questions') // Relationship field ->relationship('questions', 'title') // Relationship to questions model ->pivotData([ 'question_order' => 1 ])...

ToggleColumn don't update the pivot table

I have 2 tables that they have a BelongsToMany relationship like in below ``` public function tests(): BelongsToMany { return $this->belongsToMany(Test::class, 'company_test')...

filament spatie media library plugin

Hi, I’ve installed the Filament Spatie Media Library plugin, but I’m encountering this error: "The image field must be a file of type: image/*" Any ideas on how to solve this? I’d appreciate your help!...

Show breadcrumbs on mobile

Hi is there a way to show breadcrumbs on mobile, i treid overiding this fi-breadcrumbs and setting to display block but it is still hidden on mobile, thanks

ManageRelatedRecords widgets with table filter records

I have the following error:
Unable to resolve dependency [Parameter #0 [ <required> string|int $record ]] in class Filament\Resources\Pages\ManageRelatedRecords
Unable to resolve dependency [Parameter #0 [ <required> string|int $record ]] in class Filament\Resources\Pages\ManageRelatedRecords
In Page I have...

Close modal from List HeaderActions

I'm having problems with closeing a modal inside a list header actions: The ID is random and unique. So on opening the id changes. Dispatch close is not working. How to close the modal after the action? ...
Solution:
I've managed to create a work around, because the unique / random id of the modal is not retrievable from withint the action (as far as i know) After save and notification add: // Refresh the page...

Routes in Filament

It seems that routes in filament are stored decentrally in the vendor files. I find them with php artisan route:list. But how to create a workable situation with this? Isn't it much more convenient to define the routes in web.php? Does anyone know where I can find documentation about this? I have not found it on the filament website.

Filamentphp page not work

Hello everyone, a question, is anyone else's filamentphp page not loading, since yesterday it is staying like this: Unable to access this site filamentphp.com took too long to respond. Please try:...
Solution:
It's up and running here.
No description

Need help with Filament Filter query

What is wrong with this filament filter query? The query never gets updated with the having clause and results are unchanged after applying this query. Can someone help here?...
Solution:
Turns out this was the solution. I can use the having in the child query. Not sure this is efficient, but this works for now....
No description

hide column filament shield

i want to hide these column in a table which is im currently using filament shield, but i cannot find any role resource for edit this page
Solution:
Check the plugin documentation. You must publish the view in order to change the default setting
No description

Disable form and button save

How can I disable the save function on a form? Let's say the record is at a point where it cannot be modified because it has reached its final stage, like an order... Once the order is issued, it cannot be changed but can still be viewed. How can I handle this situation?...

Any way to change the way the options for the TrashedFilter display?

Instead of them saying "deleted", I want to replace the words with "disabled". I've been able to replace the main label for the filter pretty easily, but I'm not sure what the values for the options are already, and any attempt to just reassign the values of ->options have been unsuccessful so far. I'd prefer to not have to remake it all if possible
Solution:
the TrashedFilter extends the TernaryFilter, so you can use trueLabel and other methods https://filamentphp.com/docs/3.x/tables/filters/ternary#customizing-the-ternary-filter-option-labels...

Help with creating multi step wizard

Hi, i'm creating a multi step wizard for the registration process. First step is the user, second step is a company model in relation with the user model, and then there are other steps in relation with company model. I did something, but when i try to get the user name with $get('name') i get null. ...

filters on sub-navigation instead of tabs?

Is there a way to generate filtered list views on subnavigation instead of tabs?
Solution:
You can always have more than one resource per model, and filter each one accordingly.

Filament "native" menu items for Top Navigation

Hi, Currently I'm using this solution to be able to add custom menu items to the Top Navigation (render hooks). https://discordapp.com/channels/883083792112300104/1253096618446815262/1253131837501341859 The thing is, is there a way to use the same blade components that are used when the Top Navigation bar is used as "replacement" of the Side menu?...

Change position of individual notification

Is it possible to change the position of a Notification right in place where I am going to send it? I digged into the docs, but it seems like it could only be configured globally. I need only one specific notification to be centered. All other notifications should remain on the default position.

WhatsaApp Editor

Hello, I have created a wa.me link generator in my filament app with a custom page, it works with a selector for the numbers calendar and a text area for the message, I want to be able to put the Whatsapp text styles that are similar to markdown but they are not the same, so I thought to create a WhatsappEditor class that extends from markdown editor but it gives me error, to see if any of you can help me solve it or if you have a long time to vreate that plugin <?php namespace App\Filament\Forms\Components; ...

Filament custom exeptions Notifications

I want to catch my exceptions that interrupt the code, but at the same time do not show the client of the site, an incomprehensible window with an error. And in the notification it shows the error text. But I can't get the one that when I click on the submit form button, the button freezes and an error appears in the console. But if I reload the page, the notification appears....

From Livewire to Apine

Hi there! This field doesn't need any request to work. What would be the appropriate way/syntax to translate live() / afterStateUpdated() methods to Alpine.js? ```php...