Filament

F

Filament

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

Join

Run JavaScript code after the page loads

Hi, I'm using the latest version of Filament. In my project, I need to run a JavaScript code (variable) in Blade when a button is clicked. I will use it as simply as in the codes below. How can I make it work? ```php <?php...

Cannot store select options data in another table

Good day, in some modules it's working... but in this module is not working,, I want to add gender of the user but the userDetails is separate from users table code Resource...
Solution:
you should do this if you are using a single relationship

Filament Shield: 1 Same Model in 2 Filament Resource

I have two resources that use the same model. When I assign a role that should only grant access to Resource 1, it doesn’t show up on the User’s dashboard. However, if I enable access to both Resource 1 and Resource 2 in the role settings for User, both resources appear in the dashboard, which is not expected because I only want Resource 1 to be visible in User Dashboard and both resource in Admin Dashboard. How do I show only Resource 1 to User Dashboard?...

Lazy load table column

I had a table where one of the columns took a long time to compute. It caused the table to load longer because of that one column. Can the table builder implement some sort of lazy loading for columns in the table without implementing deferLoading() for the table as a whole? I appreciate all the answers and help, Thank you....

Filament color is not reactive

At first, i found out the badge color inside table doesn't update alone with the text. For example, when the status value is changed from activated to deactivated, the text inside badge will update to the getLabel() value, however, the color of the badge stay the same. I thought it was an issue relating to badge. The text column code: ```php...

My Relations Manager tables doesnt show the actions and header actions

Im just started using Relation managers, and the actions doesnt show in the table,
No description

dispatchFormEvent not defined

I am using FIlamentForms and I would like to use dispatchFormEvent function but it is not defined!

RichEditor - Is there a way to make it scrollable?

I have a RichEditor and the text that it contains is extremely long (think: legal document). That means that if someone goes to edit the contents of that field, the editor box expands to fit the size of the text, rather than limit itself to, say, 15-20 lines, and then have an internal scroll bar just for the editor field. Is there a way to force it to stay a certain size or number of lines with internal scrollbars so that if someone wants to use one of the editor buttons (e.g. Bold) that they don't have to scroll their entire screen back up to the top to press the button, and then scroll their screen all the way back down to wherever they were working?...

Show logo on mobile resolution

Is possible to not hide the logo when the resolution scales on mobile with hamburger menu show?

auto fill when i select

i want when i select debtorCompany take data from debtorCompany and fill automaticly in code and email textinput this is my code ```Forms\Components\Select::make('debtor_company_id') ->relationship('debtorCompany', 'name') ->label('დებიტორის კომპანიის დასახელება') ->required(), Forms\Components\TextInput::make('debtor_identification_code')...
Solution:
ok, you didnt mentioned it in the original message 🙂 did you add ->live()?...

419 errors after authenticating users.

Hey everyone, I'm expierincing an issue on the login of my application. I'm currently building a lease management app. But i'm using 2 login forms. One for the admins and one for the tenants. But currently when i'm logged in into the tenant login. And i authenticate my admin im getting errors that my page is expired. Anyone knows how to fix it correctly And want to assist me with this issue?...

Creating custom theme breaks Vite

I followed documentation on: https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme Everything works fine after running npm run build, however npm run dev is no longer building assets and I get html only page. It seems like ->viteTheme('resources/css/filament/admin/theme.css') is causing this issue. ...

how can I make a date picker on a filter?

I've already used this basic structure but it gives an error on make, as an undefined method, i saw this on documentation, but it didn't help.
No description

Filament repeater translations messed up structure on save

When create repeater first row for the model on bg language the result in the db is: {"bg":[{"name":"first","slug":"first"}],"de":""} Adding second row for same language is okay and the result is: {"bg":[{"name":"first","slug":"first"},{"name":"second","slug":"second"}],"de":""} ...

How to inject form data into a custom view

In this example I need to send the value of the "details" field through ->viewData([ 'details' => '' ]) I tried $get() but it didn't work...
No description

Table Widget - query with join

Hello, I have simple Table widget with custom query that use JOIN. I can't use relations but need to use JOIN function ...
Solution:
Solved using select() ```php public function table(Table $table): Table { ...

Add custom button in Relation manager form

Hello I am trying to add a new button to my relation manager form beside create and close It seems quite tricky because this block of code doesn't work for me actually...
No description

Filament Notifications and `wire:navigate`

Hi! Quick question, maybe someone had this issue before, can find anything about it. Here is what's up... ```php // in root layout /layouts/app.blade.php <livewire:notifications />...

Filament ResetPassword notification - set locale correctly

i do: ```php app()->setLocale('ca'); $user = User::query()->where('email', '[email protected]')->first();...

redirect after create

Please your kind support, I want to redirect page after create new organization to view page, knowing that create show in modal, I try it but it doesn't work.
No description