Filament

F

Filament

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

Join

Any way to toggle first in client-side?

Toggle column is absolutely awesome for what it does. However, because it is not entangled, it does not have a good UX when working with slow internet. How can I improve this please? (e.g. let the toggle happen client side while server roundtrip happen background)...

filament, liveire full page compnent and larave breeze css issue

Hi i have a full page livewire component and all is good except if I add the presets to the main tailwind config, it breaks the breeze dashboard and profile styling, if i remove presets everything works but the filament colours are not showing in the component, i did make a custom theme for the admin panel, but not sure if i need to use that or even how to use it in a full page component. thanks.

Copy Action

Hello everyone, I have the code below. When copyFieldsToState is triggered, I want to copy specific data. How can I proceed this way? Currently, I can only print it with a notification. ->hintAction( Action::make('copyFieldsToState') ->icon('heroicon-m-clipboard')...

Pass parameter from RelationManager createAction to form

Hi, I'm trying to have a custom create button in my RelationManager in order to create a new record with parameter(s). I've searched and tried several things but still struggle on this....
Solution:
Ok, I managed to do it: ```php ->beforeFormFilled( function ($livewire) { $livewire->mountedTableActionsData[0]['action_type'] = 'test';...

Multi-tenant: search across all products

I have a multitenant application. My tenant is called 'organization'. I want a user to be able to ask information about a product by sending a message. I have therefore a MessageResource with below snippet. The idea is that a user can search across all products in the database, not only the products that he's owning (=assigned to his organization). Below code works but only shows the products linked to the organization. ` Select::make('product_id')...
Solution:
You would combine those. Sorry I was focusing on the resource itself but you actually need it on the select 🙈

How to make my custom Prebuilt Actions?

Hello everyone. I want to make my own custom Prebuilt Actions. Here are the default ones https://filamentphp.com/docs/3.x/actions/prebuilt-actions/create...

Add Dropdown element to Laravel Filament top bar

Hi Everyone, I'm working on a project with Laravel Filament and I'm looking to enhance the top bar by adding a dropdown field. Imagine a vibrant red rectangle at the top of the screen; that's where I envision the dropdown menu being placed. ...
No description

Textarea autoSize after save or error

I'm trying to make my textarea autosize. Everything works fine upon rendering, but if I save the form or encounter an error, the textarea does not autosize and shrinks to 2 rows. Basic form : ```php Textarea::make('textarea_input_test')...
Solution:
There’s an open PR that will fix this when it’s merged.

Split Layout Grows with growing field size. How to fix?

I have the following split layout with sections in each of them. I also have a Multi-Select field and as I select the Split Layout expands. Any idea how to fix this?
No description

Why does FileUpload not respect ->rules() ?

It seems that when specifying rules to a FileUpload field, it is not validated. Is that expected behaviour? ```php FileUpload::make('csv_file') ->label(__('CSV File'))...

Repeater data record didnt appear in relationship

I have supplierRestock that hasMany restockItem (relationship is defined in supplierRestock model), so i use repeater and try to edit some data inside but i cant find the data only from repeater. I dump the data in create record with handleRecordCreation but find nothing from tableRepeater. when i try remove the relationship() it appear. ```Section::make('')...
with relationship()

Filament shield resource not showing on admin panel

i have created 3 other panels, then the roles resource didn't appear on the admin panel. also the other pages like general settings and mail settings that come with the riodwanto/superduper-filament-starter-kit need help...
Solution:
thanks, i solved it by enabling register_role_policy on the config

Using global variable in form input method at resource class

How can I use like a global variable in form input method at resource class? Here's my case: ```php TextInput::make('jumlah')...
Solution:
Yes. $this->record->loadSum('retur_vendor_detail') and then use $this->record->retur_vendor_detail_sum

Action not trigger

The accept button within the notification could not be triggered successfully
No description

Does filament offer a feature for users to delete their own account?

Title.
Solution:
You can certainly override any of the auth classes.

Limiting validation rules

I have a single form with multiple sections. I declare the validation rules for each field via the ->rules() method. I would like to only process the validation rules for the section that the action button was pressed in. I have reasons for using ->rules() instead of Filaments helper methods like ->string(). In the following code, when the personal_action button is pressed, I want to validate name but not company_name. Or, when the business_action is pressed, I want to validate company_name but not name. Is there a way to accomplish with Filament?...

Require Login/Register to Execute Action

I have a public page (Livewire component) with a Filament form: ```php class CreateFirstBooking extends SimplePage implements HasForms {...

Sort cluster navigation

How to sort cluster navigation because this protected static ?int $navigationSort = 3;does not work for it.
No description