Filament

F

Filament

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

Join

Why is the create button still rendering below even though I used a wizard?

hello i have an issue when i want to using Wizard form there's a button below that i want to remove the button create , create&another and cancel.
No description

Using infolist actions inside livewire component

Hello, i have an issue when trying to use infolist actions inside livewire component: ```php <?php ...

Custom Page canAccess runs after mount ?

Noticed that canAccess runs after mount. Any way to make it run before. Or not show custom page navigation at all by modifying the route? Not sure how to change a custom pages link. Because they I could pass in the user or another model....

Default option for select filter

I'm trying to set the default option in a select filter but it doesn't seem to apply. ``` SelectFilter::make('lead_type_profile_id') ->label('Lead Types')...
Solution:
I realized this is because I'm using multiple() so I need to return an array in default(). Here was what fixed it for me: ->default([Filament::getTenant()->tenant->leadTypeProfiles()->base()->first()->id])

Separate Sessions for User and Admin Portals

I’m using Jetstream for a user (client) portal and Filament for an admin (employee) portal. These are two separate entities. I have already set up two guards (web and admin), but they both override the same session row in the database. As a result: 1. When I log out from one portal, it logs me out from both....

Multiple definitions

Laravel Filament pulls in the kirschbaum-development/eloquent-power-joins package and PhpStorm started complaining about 'Multiple definitions exist for class Builder'. It finds it in the package stub. Has anyone encountered this? How can I fix this?
No description

Refresh form Select component via Section headerAction (inside Resource file)

I've been attempting and failing to refresh a Select component after calling an approve() method on a Review model, which sets a model attribute called review_status_id to ReviewStatus::Approved (an enum case) and saves the record. This is all within the ReviewResource file. If I refresh the browser, I see the updated status, but I'd like the Select component automatically display the new status as the selected option. I'm sure this is easy to achieve, but unfortunately my knowledge of Livewire is somewhat limited at the moment.
```php class ReviewResource extends Resource {...

How to make all tables have same options for pagination?

Im not using admin panel, only tables pkg. How to make all tables have same options for pagination? I dont want to define it for all tables, i want to define it only in some place and then it applies to all tables of the project. How?
Solution:
yeah -> records_per_page_select_options

Filament - Google maps

Hello, I'm new to Laravel / Filament. I'm thinking of using this package: https://filamentphp.com/plugins/cheesegrits-google-maps#map-field My need: display markers according to an address table. That seems OK. However, when I click on a marker, I'd like to open a modal window. I think that's feasible, don't you?...

Failed to lazy load a column in a table

I have a custom column that lazy load a livewire component. But it still wait 7 seconds before seeing the table appear on screen. Have you ever lazy load a column in a FIlament table ? ```php <?php namespace App\Tables\Columns;...

illuminate/console

Hi, I'm new in Filament, and i have problems with composer intall composer require filament/filament:"^3.2" -W The "3.2" constraint for "filament/filament" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints ./composer.json has been updated...

tenant switcher logs me out when using custom domains

Is there a way to get the session to apply to different domain names?
Solution:
Solved this by adding SESSION_DOMAIN to env like this
SESSION_DOMAIN=.mydomain.com
SESSION_DOMAIN=.mydomain.com
...

Bolt Issues migrating

SQLSTATE[HY000]: General error: 1824 Failed to open the referenced table 'bolt_fields' (Connection: mysql, SQL: alter table bolt_field_responses add constraint bolt_field_responses_field_id_foreign foreign key (field_id) references bolt_fields (id))
No description

Lazy load a custom column in a table

I display a Model in a table and all of its columns are model attributes that are stored in the DB so the table loads instantly. Now I need to display a computed attribute that requires an api call to an external service that takes 2s approxiamtively. Id like to lazy load only the column displaying that attribute. I was thinking doing like this ```php use Filament\Tables\Columns\Column; use Livewire\Attributes\Lazy;...

Custom Pages By User

Hi all I need a little advice on the best approach. I have a Reporting page whereby I select a user and then I can multiple sub pages to view different types of data about said user. Currently I select a user and I get the URL
/rephub/dashboard?selectedUser=10
/rephub/dashboard?selectedUser=10
...

quick question about split

how can i still show the column name while using a split on a layout table only on laptop size so lg ? currently i have this ``` Split::make([ TextColumn::make('uuid')->label('Client number')->toggleable()->searchable(),...

RelationManager table action always injects the same record

What I am trying to do: On a relation manager I have a table action, that displays audit log details. Not all audit logs have details view, so I dynamically resolve content and visibility based on audit log class. If you need any more context feel free to ask. ...
Solution:
So after some more debugging, i found the issue. It was in the User relationship to the auditLogs. Since I have two morphs fields in auditLog (parent and related), this specific relationship queries by both of them: ```php public function allAuditLogs(): MorphMany...

Toggle buttons not working in form integrated in custom ViewRecord page

Hi, I have integrated a form in a custom ViewRecord blade template. The form is defined in the Resource as secondForm() and then integrated into the ViewRecord by defining the getForms() method in the ViewRecord class (e.g. UserResources/Pages/ViewUser.php). The form is rendered in the blade template via {{ $this->secondForm }}. This works in principle, but for every Toggle element used in the form I get the following console error: `Livewire Entangle Error: Livewire property ['d...

slow performance and 500 errors with large data

I've looked over older questions and just want to clarify if this is something to be optimized in v4? In my loadtest I have 20,000 users, and it returns a 500 error. And if I downset to around 15,000 users, the page will load but runs extremely slow. Is there anything available to optimize that I may be missing?...

Custom Table Name in RelationManager ?

Hey all, is there a way to change with table the relationmanager should query? Tried using the modifyQueryUsing, but it looks like it prefills that value......