Filament

F

Filament

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

Join

soft delete modify query using

When a resource table is setup to use modifyQueryUsing(). how can I make it still filter with the trashed() functionality from the filter section?

Issue: Filament Shield - Permissions and Roles for Models Without Filament Resources Not Visible or

in Filament Shield, where permissions and roles for models that do not have Filament resources are not visible or manageable in the Shield interface. Even if permissions and roles are successfully created manually using Spatie Permission, they still do not appear in Filament Shield
No description

MorphToMany Select Relationship

Im getting completely frazzled with MorphToMany setup in a select instance. I have a User that Morphs to Many Organisation and Product. Im trying to merge the items into a single Select, and I have it working, except when trying to edit a user, I cant get it to show the already existing records as already selected values. I found this function...
Solution:
Ah, I figured it out, I don't return it, I attach to $component->state();

Autofill TextInput based on Select value in FilamentPhp

I am developing a project in FilamentPhp and I have encountered the following problem that I do not know how to solve. I would like to be able to auto-complete a TextInput dynamically depending on the value I select in a Select, that is, the logic would be the following: I select an option from the Select...
Solution:
This is possible, check the following over the docs: - Form reactivity - live() method: https://filamentphp.com/docs/3.x/forms/advanced#the-basics-of-reactivity - Set the state of another field: https://filamentphp.com/docs/3.x/forms/advanced#injecting-a-function-to-set-the-state-of-another-field...

Table ImageColumn only for certain rows

I'm creating a leaderboard table and would like the first 3 rows to have an image instead of text position (1,2,3). Is it possible? Any idea? thnks...
Solution:
I solved it definitively with a ViewColumn and a custom view

Make the topbar backdrop blur

Good day guys. How can i make the fi-topbar blur? .fi .fi-topbar { @apply backdrop-blur-sm; }...

Dispatching a livewire modal from Action in a Table

Hello, i am trying to open a custom livewire modal from an action inside a table i have in a resource. ``` Action::make('modal_with_voucher_details') ->label('Show')...

update value

I have an issue with modifying textarea field by javascipt i wrote a function i call it on the change of a drop down and I add value of select to the textarea this function works properly and the value of select dynamically added to textarea while changing. the issue is when i submit the form i cant get the modified data in database and only data typed directly in the textarea stored in db what is the issue? Translate::make() ->locales(['fa', 'en']) ->columnSpanFull() ->columns(2)...

Advanced Nested Relationship Form builder

I have EventStaff Model Thats HasOne EventStaffDetail using staffDetails() method ```php public function staffDetails(): HasOne { return $this->hasOne(EventStaffDetail::class)...
No description

Did anyone use filament-shield until it was deployed on the server?

I have a little problem where the roles dropdown is empty, there is no roles option when creating data but in the filament-shield menu (sidebar) there is a list of roles. because when I run it on local everything is fine, the roles dropdown list appears... I have tried: sudo composer install sudo php artisan shield:install...
No description

Repeater with existing data

```php Forms\Components\Section::make('Request Items') ->schema([ Forms\Components\Repeater::make('requestHasItems') ->relationship()...
Solution:
nvm, the code i have suddenly working. ๐Ÿ˜…

disable recordUrl

how global config in provider prevent table click row i try this ` Table::configureUsing(function (Table $table): void { $table...

Unable to sent email notification in Filament

My email notification not working in one of the project, including reset password, registration verification and custom email What i have done Tested my SMTP Change .env QUEUE_CONNECTION=sync...

Event Not Dispatching to other 'TaskUpdateModal' Component

Iโ€™m having trouble dispatching an event to another Livewire component (TaskUpdateModal) in my Laravel project using Livewire 3. The event dispatch seems correct, but the listener in the TaskUpdateModal component is not triggered, and I canโ€™t figure out why. 1.In the TaskTable component, Iโ€™m dispatching the event like this: ```...

How to set domain for tenant in Login page ?

When using Multi-tenancy, I want each tenant to have a dedicated domain on the login page.

How to style each xlsx row in export action

i know there is getXlsxCellStyle() but its apply to all row, how to do it just for row i want to style?

Error on select.js getChoices options

after run composer update a select component is not working. Code: ` Select::make('customer_id') ->label('Cliente') ->getSearchResultsUsing(function (string $search) {...

isTableRecordSelectable is not working

I want to hide bulk select in certain records with the following conditions, but when it met, the bulk checkbox is still exist, what did I miss? ```php public function isTableRecordSelectable(): ?Closure {...

Change uploaded file permissions

I'm uploading a file (ssh_key) with a FileUpload element, in my Resource. However, I would like to make sure the permissions for the uploaded file are 0600, but I'm not being able to do so with "afterStateUpdated" method, which I though was the way to go, like this: ```php ->afterStateUpdated(function ($state) {...

Button Edit Action disappear after first click

Button Edit from my ViewResource header always disapear after first click (see video attached). On the client side I have this error on the console from Morph.js
TypeError: e.setAttribute is not a function
TypeError: e.setAttribute is not a function
. I can't figure out what's happened. It happens on other part of my UI. Also its only in production where I use FrankenPHP. The livewire/update request retuns a 200 with the button present in the Livewire response. Morph dom seem to fail to morph the dom accordingly ? Any ideas of this...