Filament

F

Filament

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

Join

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')...

Modify/add colors when using Filament outside of panel

Hi guys ! I'm trying to change colors of Filament components and I was able do to it for the Panel but not for the blade component used outside such as <x-filament::link/>. I tried this in my tailwind.config.js but it doesn't work : ```js...

Save Spatie Media Library File in Relationship

I have a form resource where I save the child and the parent but when I try to save the files for the parent it does not store them, just the other attributes except the files. Models: AuctionCar belongsTo Car AuctionCarResource.php ...

SpatieMediaLibraryFileUpload - Display is very slow

I'm allowing users to upload images. However, I want to keep a high quality version for future cropping. How can I display a conversion (ie., thumbnail) in the field, but allow cropping of the original in the editor? The reason this is important is that some users have images that are 10+mb and the editor is taking for ever to load on mobile. I don't need the full image unless the editor is actively open....

Hiding the super_admin role

Hello everyone, user creation, I have a select with the roles (super_admin, panel_user, manager_user, seller_user), I would like to hide the super_admin information from the other roles. I'm using filament shield plugin. how do I do this?...

Table Actions Column Label alignment

Hello All. It might sound silly but I've been trying to figure out a way to just align the resource Actions column in the table view and I can't seem to find a way to achieve just that silly action. By default all the Table columns have their content and labels aligned to the left, but the actions table column has a right alignment. Based on the documentation, I am able to align the actions themselves to left/right using helper classes, but what I am after is to set the alignment for the label itself....

slug is not generated within createOptionForm

slug is not generated within createOptionForm ```Forms\Components\TextInput::make(name: 'name') ->required() ->maxlength(255)...
No description

I need with Select Edit/View

I have a select where I define the user's role, according to the user's role a type of input appears to fill in, the creation is ok, it saves in the bank, but when editing and viewing the user this dynamic input does not appear, oh no unless I select my role again. In the Select field I am using ->live(). In dynamic fields I am using ->visible() ...

Table repeater headers

I have a problem when using table repeater, the header has a white dark mode bar
No description

Implementing Content Security Policy Headers

Hello, im trying to implement CSP headers, i did manage to do it for most part but could not setup nonces for livewire.js and other scripts at the footer like notifications.js etc. I understand the team discussed this and decided not to implement it due to slowing down development efforts but i believe this deserves a second discussion. I propose that at the very least offer the ability to set nonces for these footer scripts. As it stands right now(corrent me if wrong), these asses get 'compiled' into public director under random filenames. If we had an option to add nonces this would be very helpful as it offers the ability for developers to decide on either implementing it or not, considering the issues that may come! Plus, i have seen companies skip using filament due to the fact that CSP headers are so hard to be setup....

error: Array to string conversion

i am getting the error 'Array to string conversion' in this code: ``` Forms\Components\FileUpload::make('image') ->columnSpan('full')...

Filament TextInput Clickable External link

I have an action and I want to make a TextInput field clickable so it opens the link of the tab, is there anyway to do this? I read the docs but didn't find anything ``` public function clubAction(): Action { return ViewAction::make('viewClub')...

Role in hidden/visible

- I have a Select, that after you text and select, the other two inputs are autocompleted with the correct information - The two textinputs are 'name' and 'age', that are autocompleted, but only 'gender' is a role - Depending on the 'gender' information, it will show one new textinput called weight feminine or weight masculine with hidden/visible - I'm having a problem 'cause, even using hidden/visible, ->reactive() and ->live(), it's not showing the new textinput acording with 'gender' , - In other pages, like edit, the same text input ('gender') is returning null...
No description

How do I access the whole form using $get/$set when inside a repeater with relationship?

I have a fairly complex form that has a repeater that has among other values a "cost" column. When this changes in any row of the repeater I need to update the state of a field outside of the repeater with a total of all the cost fields, however using Filament\Forms\Get and Filament\Forms\Set I can only access the current row of the repeater. How do I: a. Access all records in the repeater to calculate the total. b. Access the wider form so I can use $set to update the total field. Just to make this more awkward this field is in a different relationship (but not a repeater)....

External js on just one dialog

My payment processor has custom js to send card# directly to them & bypass my backend. I don't need their js throughout my app, so it doesn't seem like assets#registering-script-data is quite right for me. Furthermore, the script tag to load their js requires an api-key attribute - maybe I need a custom layout? Thanks in advance!...
Solution:
got the tag working by adapting a snippet from the alpine docs. ``` <div x-data="{ init() { const head = document.getElementsByTagName('head')[0]...

Reload Page on table row action success

Hi, I have a EditPage for a resource that is showing a detail of the resource. In this page I have a Form (FormBuilder). Two of the fields are Livewire::make() components....

Buttons duplicated

all the buttons in my panel are showing up twice in production, but not in development. see attached for an example. i'm on v 3.2.112. does anyone know what the issue is? thanks! edit: it's not letting me attach the photo here. see the first comment below...

Livewire Methods on custom fields

I want to call a livewire method on my custom field via $wire. $wire.call('doAThing', withAValue) As far as I can tell, to achieve this I need to implement a trait that can be used by the page and add the doAThing function to that, passing the fieldName as a in order to be able to retrieve the field... Is that correct?...

installing the filament laravel panel?

how to fresh install laravel filament in my laravel 11 any guidance on it ??

How to set the Avatar for the Tenant, in Filamentphp?

I have a multi-tenancy application, I would like to set the Avatar image for the Tenant (not for the user) as shown in the image. Please help
Solution:
I believe you do it the same way you would for a user, with the HasAvatar interface on your tenant model.
No description