Filament

F

Filament

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

Join

Custom Page Order Stats / Form

Hi all im trying to find away to control the order of my custom page: ideally i'd like the form in line with my stats, is there aware to achive this?...
No description

Align toggle/checkbox

Is it possible to align a toggle/checkbox to make it look like the 2nd example? No combination of ->inline() /->inlineLabel() seems to work....
No description

Target class [livewire] does not exist.

I have installed the Pest Livewire plugin according to the documentation:
https://pestphp.com/docs/plugins#livewire
I set up a TestCase, configuring the default user and panel.
...

Running action throws "using $this when not in object context"

I'm working in the table of a standard Filament resource. The documentation says I can do this: https://filamentphp.com/docs/3.x/tables/columns/getting-started#action-modals ``` use Filament\Tables\Actions\Action;...
Solution:
->action(function (Post $record, Page $livewire)... then, use $livewire->dispatch(.....

filament repeater to store values to multiple rows

i have a project where i should be able to add stocks for the products. and i want to add multiple stocks using repeater . here each product has many relation to stock. problem: repeater gives output as json to one single cell in the db but i want it to fill columns and rows how do i do...

Checkboxlist - disable click on label

Hi all, I've got the following checkboxlist: ```...
Solution:
try ```css .fi-fo-checkbox-list-option-label { @apply pointer-events-none;...
No description

Export Action didn't Export A Defined Column

Im trying to export a table of temporary password into xlsx & csv. The migration and model is pretty simple model ```class TemporaryPassword extends Model {...

Attach BelongsToMany after creating a record in from a table

Sorry, the title is weird but I'm not sure how to summarise it. I have a many-to-many relation something like ```php...

custom page form from resource

hi just want abit of advice i've added the element to my custom page:
<form wire:submit.prevent="submit">
{{ $this->form }}
</form>
<form wire:submit.prevent="submit">
{{ $this->form }}
</form>
...

Display data based on the option selected in select

Hi colleagues. I'm wondering if anyone can help me. I've created a form with a related drop-down menu that loads tutor data....
No description

Render relation manager under condition

Is in filament possible to show relations only under some condition ? I need to show ProductsRelationManager only, if the edited Category isnt parent. Image is just example, what I would like to create....
No description

Not Working LocaleSwitcher if i selected de or en

` ->afterStateUpdated(function (Set $set, ?string $state, Get $get) { $locale = $get('activeLocale') ?? app()->getLocale(); // Get current locale dd($locale); $slug = $get("slug.{$locale}"); ...

Tenancy Cors error

Hi all, I'm using tenancyforlaravel icw filament, and most all is working fine. But now on a ToggleColumn I get the following cors error: - Access to script at 'http://examp.test/js/filament/tables/components/table.js?v=3.3.5.0' from origin 'http://duru.examp.test' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. - GET http://examp.test/js/filament/tables/components/table.js?v=3.3.5.0 net::ERR_FAILED 200 (OK) - Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://examp.test/js/filament/tables/components/table.js?v=3.3.5.0...

Force select value based on a toggle option

I have a select value with three possible values (0 ,1, 2) ,next to it I've a toggle, when the toggle is true, the select value must be 2. So on my Toggle I'm using ->reactive()->afterStateUpdated( to update the select value, and on my select I'm using disabled(fn ($get) => $get('my_toggle') === true). The problem is that now the select values does not gets submitted, so the value is never updated. Is there a "pretty" way to do it ? As there's no readonly method on Select....
Solution:
ssooo
->disableOptionWhen(fn (string $value, $get): bool => ($get('my_toggle') === true && $value !== '2'))
->disableOptionWhen(fn (string $value, $get): bool => ($get('my_toggle') === true && $value !== '2'))
...

togglebutton group information

hello team, I read the docs, but I still not have the right behaviour I want with filament I created a filament page, with a form filled, and I want to group my items by sort of information In other words, I have an array which contains another array in it, and I would like to split my array into 2 defined groups ``` return $form...

Badge count on relation manager tabs

Hi all, is it possible to get a count of all the records in the relation manager tab badge?
Solution:
in the relation manager ```php public static function getBadge(Model $ownerRecord, string $pageClass): ?string {...
No description

Having to click action button twice for changes to take place

I have this Button and on click I want to change pdf template Actions\Action::make('test_smthng') ->label('Change PDF preview') ->action(fn () => $this->selectedView = 'pdf-templates.layout.pdf-preview-default')...

Add logout navigationItem to sidebar

Hello ! I'm trying to add a navigation item on my sidebar to logout, I made this in my panel : ```->navigationItems([ NavigationItem::make('Déconnexion') ->url('/logout')...

Form in view record

In my Intervention resource, which displays the details of a client's intervention, I want to add a form that allows users to add activities related to this intervention. This form should contain a simple textarea field and be displayed directly on the intervention's view page (which extends ViewRecord). Additionally, the activities that have been added should also be displayed on the same page, below the form. How can I achieve this in Filament and Laravel?...

Create resource for email marketing

I'm almost finished with my SaaS project, and one of the things I'm including is the option to do email marketing. That is, to be able to create email campaigns and send them from a Filament resource. My question is if there is or do you recommend a way to do this, and where I can have an editor or preload a template with pre-made designs... I'm thinking about asking an AI like Claude or ChatGPT to create some templates for me, but I don't know how I could do it so they're editable and can be previewed by the user. Maybe my question is a bit confusing, but finally, any ideas or recommendations would be great. I want this part to be extremely easy for the end user as well, since the first image gives the option to customize or create something like that on the same page. And if I can make this easy for my client, it will be so much better... My idea is to make it as easy as possible for my client. I think I could set up some fixed fields using image, textarea, and text input types, and just change some predefined designs that I could add in the future. I could start with 3 or 4 but offer more designs to my clients later. This way I make my client's life much easier with email marketing....
No description