Filament

F

Filament

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

Join

Laravel Echo cannot be found on custom page in filament

Hey folks, First of all echo is working outside filament properly for all type of channel and event are send properly but inside my filament custom page it give those error ``` echo.js?v=3.2.116.0:2 Uncaught You must pass your app key when you instantiate Pusher....

Removing the per page summarization

Hi. Is there any way to disable the "hasPageSummary" for the summarization on table widgets? See attached. I am only interested in seeing a total sum across all pages....
No description

Button blade component customization

I am using the button blade component and I noticed that a loading indicator appearing after click on the button. Is there a way to remove that loading indicator by passing example an attribute, or any other ways? ```php <?php <x-filament::button wire:click="openNewUserModal"> New user...
Solution:
Yes
<x-filament::button :loading-indicator="false" wire:click="openNewUserModal">
<x-filament::button :loading-indicator="false" wire:click="openNewUserModal">
...

Filament Form Component, Colors not showing

I have this example of livewire component using Filament Forms but the colors are not working: ``` class ResetPasswordForm extends Component implements HasForms { use InteractsWithForms;...
Solution:
Solved I forgot to configure tailwind.config.js. https://filamentphp.com/docs/3.x/forms/installation#installing-tailwind-css...
No description

Reorder Table Clear Cache

Hi guys, I am having trouble with custom action after reordering table, to be more precise to clear cache once reorder has been done. I am doing boot method on model, but it is not triggered. Tried also with setters for order but they are not trigger as well? Any idea how to clear cache?...
No description

How to completely restrict access to a Cluster in Filament, even with a direct URL?

I have a BeShield class in my Filament project that extends Cluster. I disabled access by using the canAccess() method, returning false, so access should be restricted. However, when I directly enter the URL, like http:// localhost:8000/app/be-shield/compliances, the page is still accessible. How can I ensure that access is fully restricted, even when attempting to access the page directly via the URL?
No description

Uploading video on resource

I have this on my resource ```php Forms\Components\FileUpload::make('image_url') ->image()...

How can i update field Information when reactive doesnt work

Hello folks, I would like to update the array for the disabledDates() as soon as the item changes. I tried using afterStateUpdated in the select field for Item, but unfortunately it doesn't work. Then I made the field reactive and wrote a small function that outputs the occupied days based on the item. When editing, the correct days are loaded for the item (screenshot 1). But if I change the item or add a new one, no data is loaded? How can I make this reactive?...
Solution:
Maybe an issue with DateRangePicker, because disabledDates in Filament Date Picker will work using native(false) https://filamentphp.com/docs/3.x/forms/fields/date-time-picker#disabling-specific-dates ```php...
No description

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