Filament

F

Filament

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

Join

How to add a dropdown and access the selected item in base query

I am using seperate schemas in Postgres with tenancyforlaravel. I want a dropdown to select the tenant, then I can view the table/create/edit etc... I want to switch to tenant db connection before query basically. ...
Solution:
I fixed it. Forgot to give error message and code. I override route function in every page like List etc, just add custom middleware that reads tenant param. ```php public static function route(string $path): PageRegistration...

testing performance

Hello, how can I test the application's performance? I'm interested in understanding how many simultaneous operations the application can handle can you recommend me one or more tools for this?...

How to use a Resource as the main dashboard page?

Hello, I had a BookingResource with List, Edit and Create pages which works good and the slug is /dashboard/bookings I wanted to use the BookingResource as a main Dashboard page with the slug / which is accessible using /dashboard But the issue is my client wants the edit page to be /dashboard/bookings/1/edit instead of /dashboard/1/edit and same for create page. Please let me know how do I achieve that?...

Someone who has experience with Laravel Cloud Object?

If someone has experience with Laravel Cloud Object Storage, please help me. I am encountering a CORS error with file upload using Filament and Spatie Media Library File Upload. Thank you.
Solution:
Laravel Cloud automatically sets the file system to public using FILESYSTEM_DISK=public. I believe it’s using S3, so I configured S3 in the Livewire config. That’s why I need to change public to s3 in the Livewire config. It’s a bit confusing, but thank you!
No description

Update rows in table (or table) after action on row

i have custom action to reorder categories in my plugin the db is updated but the ui/table not any idea? ``` ->actions([...

Different configuration for Actions inside ActionGroup possible?

Is it possible to change the configuration of an Action with configureUsing() if that action is inside an ActionGroup? My goal is to have all actions be shown as an ->iconButton(), but not if they're wrapped inside an ActionGroup.
Solution:
Solved with: ```php ActionGroup::configureUsing(function (ActionGroup $actionGroup) { $actions = $actionGroup->getActions(); foreach ($actions as $action) {...

Google address autocomplete api

Hello all! I'm trying to use https://filamentphp.com/plugins/tapp-network-google-autocomplete-field But for some reason it's not working, I wonder if it's broken for Laravel 12....
Solution:
The solution to this is: ->placesApiNew() The old places api is not working anymore....

How to render livewire component?

use Filament\Tables\Columns\ViewColumn;

ViewColumn::make('status')->view('filament.tables.columns.status-switcher')
use Filament\Tables\Columns\ViewColumn;

ViewColumn::make('status')->view('filament.tables.columns.status-switcher')
...

How from my Edit resource page automatically open a modal (create) who is my RelationManger

if i try like this i have an error Typed property Filament\Resources\RelationManagers\RelationManager::$table must not be accessed before initialization class WalkersRelationManager extends RelationManager...

Filament Domain Down

Hi friends I am from Uganda and I cannot access the filament documentation its domain seems to be down...
Solution:
Vpn on windows has finally worked so thats sorted

Repeater Delete specific records only

I have a repeater showing data from a database table, and I want some of to be given a "read_only" property, meaning that the record can be viewed and reordered (in my use case), but it can't be edited or deleted I managed to get the read only system to work on editing the fields in the repeater by setting disabled on each of the data fields in the repeater based on a "read_only" column (there is probably a better solution, but it works), but I can't seem to set each entry in a repeater to either be deletable or not. I tried using
->deletable()
->deletable()
with a function to check each record in the repeater array, but it just seems to only be able to set the behaviour of the entire repeater, not each individual record in the repeater....

How to make data in Livewire component reactive?

Hi, I have a Livewire component inside my form where I'm passing values for width and height like this:
Livewire::make(WindowPreview::class, fn(Get $get) = ['width' => $get('width'),
'height' => $get('height')])
Livewire::make(WindowPreview::class, fn(Get $get) = ['width' => $get('width'),
'height' => $get('height')])
...
Solution:
```php Section::make('Details') ->columnSpan(3) ->dehydrated(false) ->live()...

Record Finder Pro Plugin

Just got recently installe the plugin, it works very well in my admin app but in another panel, table query is not working. I have no restricion in the panels. also the query is available to all the roles. The gist is, The Table query are wrking fine in the admin panel but not in other panel. Thank you...

How to Display Notifications in the Filament Admin Panel When Certain Conditions Occur

I am building an admin panel using Filament and I want to display a notification on certain conditions. For example, whenever a user's balance falls below a certain threshold. How do I display this notification on the panel, preferably as a persistent notification that cannot be dismissed until the balance is full? Is that possible?

Form Repeater Validation

How to provide required validation on the repeater form when the user clicks the add button on the repeater form, so the user cannot add a repeater form if the previous form has not been filled with data?

Globally set redirect for create and edit forms

Is there a way to globally set redirection for forms to IndexResource instead of having to set it in every CreateResource and EditResource? ``` protected function getRedirectUrl(): string {...
Solution:
I don't think so. Maybe you could create a trait using this code and use it where you need it

Badge in collapsed menu

The badge in the navigation menu is hidden when the menu is collapsed. Would it be possible to continue displaying it when it is collapsed?
No description

How to only get list of tenants in the drop down if the user has any role to that tenant

Hello, I am using multi-tenancy in my project. I have around 3 tenants added and each user has different role with each tenant. I prevent user to login to the tenant login page if that user has no access to that tenant, but they can login to another tenant....

Field required validation error, even when field is filled.

After following the docs from here (https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component), the validation fails (Field title is required), even when the field is filled. When I remove ->required() and dump the results the field appears to be empty. How to troubleshoot this?...