Filament

F

Filament

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

Join

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

Interact with Chart Widget

How can I interact with a chart widget using javascript? So I can call something like chart.resetZoom()?

Using shadcn/ui for interface

I just want to know which UI library are we using under the hood, and is there a way to replace it with shadcn/ui instead? This is because of a new admin panel project I've to work on, where the client is specifically looking for shadcn/ui at the front-end....

Spatie Media Library - Image Preview Layout

Hi folks relatively new to using plugins in filament. I have installed the Spatie Media Library plugin and it works well. However the preview images are stacked. Is there any way they can be put into a grid from left to right? Here's how it currently looks:...
No description

Descriptions on CheckboxList (relationship)

Hi, I'm using this to display permissions in my user management system. Is it possible to load descriptions from the relationship without explicitly defining them in the descriptions method? ``` Forms\Components\CheckboxList::make('permissions') ->label('')...

Filament Resource Pages Title

I have to add an icon on title of all pages, I have disabled the main title of custom pages and i have created a component -> title-with-icon.blade <h1 class="i-header-heading text-2xl font-bold tracking-tight text-gray-950 dark:text-white sm:text-3xl"> {{ $title }} @if($showIcon && $description !== null)...
No description

Htmlable Filter

Does anyone know if a SelectFilter can allow html? I got a filter with getOptionLabelFromRecordUsing that returns a blade file but html is not available.
Solution:
```php ->modifyFormFieldUsing(function (Select $select) { return $select->allowHtml(); ->getOptionLabelFromRecordUsing(function (YourModel $record) { return view('')->render();...

Why we cant use take() method inside query method ?

take(1) did not take any changes . Why??
Solution:
solution apply method paginated(false) 🥲 ....
No description

Cannot login with session domain set

I want to set a SESSION_DOMAIN because I want the session to be shared accross multiple subdomains. As soon as I set a SESSION_DOMAIN, I can no longer login. I am automatically redirected to /login again after logging in....

Filament DatePicker Widget

Im already create a datepicker widget on the dashboard page, then i want to create datepicker widget more on my different page. How i can do that? im already create it but its didnt showing.

Is there a way to show search input for each column?

Hi, I wonder if it's possible to show search input for every column on the table? I know I can get the same output by just using filters, im just curious