Filament

F

Filament

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

Join

table row action to run a job?

I'm loocking for a table row action to run a job (script, service class...). I have a job (command) and i want run it with a click of a table row action. I need the record id in the script. i think the biggest challenge is the output of the success/failure message? how can i simply call a script is there an easy way? Something like that:
Action::make('run something')
->requiresConfirmation() // with or without
->action(fn ([Model] $record) => $record->[ run a job ])
Action::make('run something')
->requiresConfirmation() // with or without
->action(fn ([Model] $record) => $record->[ run a job ])
...
Solution:
For example with the action-pattern $result = (new UpdateJobSearches)->run($record->id). Return the data you need and build your response with it.

Why when I deploy Filament on the server the data dropdown is empty?

So I have a select Head Partner that takes user data whose is_head is 1 but why is the dropdwon data empty. even though I make sure the user data whose is_head is 1 exists this is the code ``` Forms\Components\Select::make('parent_id')...
Solution:
I added code like this in AppServiceProviders.php ``` if (config('app.env') !== 'local') { // pastikan hanya di production/staging URL::forceScheme('https');...
No description

Resource table action not being triggered

Hi, I've created a table within a resource and have a simple row action. When I click on the icon it spins but the action itself is never triggered. I'm not sure where I'm going wrong the file was created using php artisan make:filament-resource Service --simple --view ...
Solution:
Does the Service model have id as primary key?

How to make sure only one navigation group gets uncollapsed

How to make sure only one navigation group is uncollapsed in my panel at any given time. So if i toggle one navigation group, all others become collapsed....

Sushi to dynamically load data from API using search keyword

Hello, I am using Sushi to load a data into a table with API data using a search keyword. But I am missing something here as I am not able to load the data from API after the search but if I provide the search term initially then it loads the proper data to the table. Please check my code and help me fix this, thank you so much....

Optional path param for custom page

Hi everyone! I'm having trouble with a Filament page. I defined the {course?} parameter as optional in my route:
GET|HEAD admin/courses/{course?}/manage
GET|HEAD admin/courses/{course?}/manage
However, when I access the page without passing an ID, I get a 404 error. My mount method looks like this:...
No description

How to Determine if the dashboard is using dark or light mode in Filament?

It is possible to Determine if the dashboard is using dark or light mode in Filament? TYIA.

Is Filament PHP a Good Fit for a TripAdvisor-Like Project?

I'm thinking doing a TripAdvisor clone toy project and wondering if Filament PHP would help simplify development without getting in the way. Would it work well for something with user reviews, listings, and interactive features, or would straight up Livewire be a better option?

Add link to description

Hello all, I have modal and want to add link that when click on it then modal show with form, how to do that?...
No description

Enable or Disable Toggle by default when first page load

Hi Everyone i have problem when i create custom function schema on my grid to show list based on checklists that i have Here's the code, and i got trouble when i want to set by default the toggle is enable/active/on is everyone have any good approach to solve this problem ? ```Grid::make('checklists')...
No description

Conditional hidden field with javascript

Hi I have a field with conditional hidden property
->hidden(fn (Get $get): bool => $get('video_type') != 'file')
->hidden(fn (Get $get): bool => $get('video_type') != 'file')
...

Navigation groups cannot be clicked

I'm confused. The navigation group can't be clicked, but when minimized everything works, if it's mobile it doesn't work
No description

Table Records that don't exist in database

Hi! I have a RelationshipManager where I want to display records even though they do not exist in database. Basically I have an enum of modules and I want to show them all in the relationship table whether the user has the relationship or not. If they have it, it should have an edit action. If they don't have it they should have an install button....

How to view Export CSV row errors?

I get the database notification that some were successful and some failed, but I can't see the reason why they failed - does anyone know how to hook into that?

Tags Ownership - Multiple With Same Name

Hi folks, what would a model look like for the Spaite laravel-tags (https://github.com/spatie/laravel-tags) look like? I would like tags in which the user is the owner, tag names can be duplicated across the application, and tags have a category. Thanks in advance.

Using emoji picker to create an emoji only field

I'm trying to create a new field which only allows Emoji rather than emoji + text. Have looked into this package: https://filamentphp.com/plugins/tangodev-emoji-picker Has anyone achieved something similar already?...

Import, before action

Hi All, I'm trying to import a CSV, the problem with the CSV is that there are no identifiers for updating a record. Now i'm looking for a action before the importer runs to remove all data already availible in the DB so the new data will be leading and old data is remove....

Is it possible to DI in a class that extends Filament\Resources\Pages\CreateRecord?

mount doesn't work because the parent class has that defined already with no parameters __construct doesn't work because Livewire only injects into mount Currently I'm using app/resolve helper, but that's not DI....
Solution:
Figured it out, you have to use the boot function.

center fileupload?

it is possible to center this
No description

Light/Dark Mode Switch Animation

Good day. Is it possible to put a "animation" while switching light mode to dark mode (vice versa)
No description