Filament

F

Filament

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

Join

Encryption disappears when adding a column.

When adding a column User Encryption is disabled, it does not work, and when logging in, a message appears that the password is incorrect.

How to make custom forms more efficient

Hello - I have multiple forms on a Filament page. The forms all work, but the performance is very slow. Each update call takes between 2-3 seconds in my local environment. I'm worried that in production each request will take 5-10 seconds. Between all the forms on the page, there are roughly 500 form components. I tried breaking the forms up into even more forms (with each form containing less data), but the performance stayed the same. Does anyone have any advice for how to improve this performance? Each field is reactive and updates the relevant record when modified using afterStateUpdated. I would like to avoid using a traditional Update button like with standard EditRecord pages. There are a lot of data fields and if the user forgot to hit Update it would take them a long time to recreate their work. Thank you!...

Are thre any livewire or alpine hooks that is fired after the the DOM swap has happened.

I have created a custom component that lets users create categories on the product page. An to organize the categores according to parent and chiled I am using JS. But When the form state change it loses its style applied for reorganization. How can I tackle it,...
No description

How to perform redirect after Table action is perform

Basically, I have an action named ‘Add to compare’. I want to perform some tasks on it before it gets redirected to the Compare page which is the filament page. Please note that I don't want to perform those actions on Compare page but rather when user clicks on ‘Add to compare’ button. :fi:

Hot refresh

I understand that one of the disadvantages we have when working with TALL is that every change in a Blade template requires me to refresh the entire screen in the browser instead of using "Hot Module Replacement." This takes a few seconds with each change. Does anyone have any advice or practices so that every time I save, it doesn't result in a long wait and I can maintain an uninterrupted workflow? (Let’s understand that this is not a criticism of the stack, but rather a way to find a solution...

Center Top Navigation?

Anyone worked out the css or whatever is needed to center the top navigation items in the panel builder when choosing the top layout?
Solution:
try to create a custom theme and add this ```css .fi-topbar nav ul { @apply justify-center w-full;...

These credentials do not match our records.

i have copied a project from a repo. after I created a new filament user i get this message. These credentials do not match our records. how do i start with solving this?...

HTML Input field

Hi. I meed am input field to let the user enter an HTML table, to design the headers of a document template, so all content has the same header. RichEditor cant handle this. Is it safe or not to allow the user to enter HTML code? Any recommendations?...
Solution:
Both of these support tables, I’m sure there’s a few more too. In general though it is risky to allow direct html. You have to make sure it’s getting sanitized properly. https://filamentphp.com/plugins/mohamedsabil83-tinyeditor https://filamentphp.com/plugins/awcodes-tiptap-editor...

How to customize select option label (different when open/closed)

Is there a way to have a different render for the "preview" (when the select is closed) and for when the select is open ? Here is my code ```php...
No description

how to generate slug from title with filament version 1 ??

how to generate slug from title with filament version 1 ??

$navigationParentItem

Need a better way to view the child item without clicking the parent item when using $navigationParentItem. This will provide better UX. Any idea?...

Pass params to a custom page

How can i create route as example chatroom/{room_id} and pass this room id to custom filament page
Solution:
You can use slug in custom page protected static ?string $slug = 'room/{id}'; public function mount($id): void...

wire:keydown call alpine method

I see I can use etraInputAttributes to add wire:keydown.enter to an input. The method provided there will call a component method in livewire, but what if I want to call a javascript method on the alpine component? Is there a way to do that? ```php TextInput::make('description')...
Solution:
Using x-on:keydown.enter instead of wire:

Filament with spatie event sourcing

I'm trying to create data with spatie event sourcing, when I create the data, event attribute gives me always null. ```php Currency.php public static function createWithAttributes(array $attributes): self {...

Reordering new item on Repeater relationship throw error

When I add new item to the repeater and reordering, it throw error. This is not happened to existing item. ```php Repeater::make('shifts') ->relationship('shifts') ->orderColumn('sort')...
Solution:
Okay I solved this. The problem is because I am using action to modified the item, and missed how repeater populate their array. I just need to adjust 'key' for my newly added item. Here my updated code. ```php ->addAction(function (FormAction $action) { return $action ->label('Add Shift')...

Refresh TableRepeater

In a resource, I have a TableRepeater. I want to add an item from a modal, but when I close the modal window, the TableRepeater doesn't refresh. ```php TableRepeater::make('sedi') ->relationship() ->columns(6)...

Table columns

hi every one i would like to make my table to be grid for small devices and use the normal table when the screen is big is there any way i can achieve this using filament i need help please
Solution:
I figured out a laravel package called Agent https://github.com/jenssegers/agent

Make the table a grid of cards instead.

I have a filament resource, and instead of it being tables, i want it to be a grid of cards. How can I go about it? Does it have to be an infolist? Or can it be a table

Help me understand why tailwind partially works in livewire component on custom Dashboard?

I have created a custom Dashboard page, and there is method createReport. ``` public function createReport() { return Action::make('createReport')...
Solution:
Yes. Because resources/views/livewire/**/*.blade.php is not part of your Tailwind config.

Problem getting multiple select value in action modal form

How can I get multiple select values of form method in action method in Action class? I didn't find it when I check in $data at action method function. ```php Action::make('masuka_label')...