Filament

F

Filament

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

Join

How to Automatically Generate Invoice After Payment is created by admin?

Hi all, I'm looking for advice on how to automatically generate an invoice when a partial payment is logged. Ideally, I want the invoice to be generated immediately after the payment is recorded, with the option to preview, print, or download it. Does anyone have experience with setting this up or any recommendations on how to achieve this?...

How To Apply `->imageEditor` on FileUpload v2?

I want the user to be able to use the image editor when uploading an image. But in v2 is not available. What would u do to achieve to let use the image editor? Update to v3? Or is there a way i dont know that this may be achieved in v2? like somehow creating a custom component like v3? but im not sure if that can be done. ```php Forms\Components\SpatieMediaLibraryFileUpload::make('title') ->avatar()...

How to change this action button of repeater?

how to change this color since its not very noticeable
Solution:
```php ->addAction( function (Action $action) { $action->color('success'); },...
No description

State gone/refreshed on Custom Infolist Page when action clicked(Modal)

I just have some custom state that use ->state() not from resource for the data, and then have this issue when adding action on the headerAction on the Section, so i just move the action into getHeaderActions but still have same issue
Solution:
Solved, by using form components and then call that view Livewire

How to make wizard keep its input data after accidental refresh

By default if users accidentally refresh their browser, the wizard progress automaticly reset all input, How do i make it keep its inputted data? i dont want to frustate my users since the wizard have alot of steps...

How to access $state inside a Repeater item ->collapsed()

Hello. So I can access $state to set the ->itemLabel() But I don't know how to access $state to set ->collapsed() to true of false depending on $state['done'] ...

Reset password email - translation footer text

Hi fellas, I have issue to locate how chainable method that will allow me to override part "If you're having trouble clicking the "Reset Password" button...", does anyone know hot to override it?
No description

Select input not working when searchable is appended

The select input I added to my form doesn’t work in the sense that it return “School name is required” even though I have selected a school. I don’t face this issue when I comment out the searchable method
No description

Form not submitting user_id even though when I dd the submission the user_id is present

This is my form ```php return $form ->schema([ Forms\Components\Select::make('user_id')...

Unable to hide childItems in custom NavigationItem

I'm making a custom navigation setup and I want to conditionally hide an item from the childItems([...]), but it does not seem to work... this is a simple code to debug it faster, "nav-item-5" should be hidden ```php ->navigation(function (NavigationBuilder $builder): NavigationBuilder {...

Brick Money

I am using a third party package for the money field. I have cast with get and set attributes accordingly. Storing and viewing the record is no problem, bur on trying to edit the record i get an error: Property type not supported in Livewire for property: [{"amount":"100000.00","currency":"KES"}] For context: <?php...
No description

Page with Selects and a Chart

Hi! I've created a "Sales" page, with 2 selects on it, and a table. I load the data for each select when changed. Everything is ok. But now, I would like to add a line Chart. I've tried to ways: - If I create a Widget, render it with getFooterWidgets, but the widget get's its data in the widget class, I don't know how to send the value of selects in the page to the widget. - I can render a chart in the view... now trying......
No description

Grid table, align stack component to bottom.

Hi, I am trying to align the product title with the price at the bottom of the "card", but it is not working. I'm not familiar with tailwindcss. How do I change my code to stick the stack with the product title and price at the bottom, regardless of image size? (see attachment). ```php ->columns([ Tables\Columns\Layout\Stack::make([...
Solution:
have found an almost complete solution 🙂 ```php Tables\Columns\Layout\Stack::make([ Tables\Columns\SpatieMediaLibraryImageColumn::make('image_link') ->collection(config('project.product_media_collections.images'))...
No description

how to check what (if) attributes were updated in afterSave() method.

I need to fire an API call to let some endpoint know if model were updated.

Markdown editor with custom buttons

I'm working with the Markdown editor with custom buttons. My goal is to create a dropdown button in the editor that allows inserting placeholders into the text. These placeholders would later be substituted with the actual values of those variables. Any advice, resources, or code examples would be greatly appreciated. Thanks in advance!...

Sumarize IF.....

I have this column in my table: ```php TextColumn::make('detalles.total') ->label('Total Detalle') ->getStateUsing(fn ($record) => $record->anulado? 0 : $record->detalles->sum('total'))...

Is it Possible to Open a Modal within Another Modal in Laravel Filament?

Hello Filament Community, I am working on a project using Laravel Filament, and I came across a situation where I need to open a second modal inside an already opened modal. In other words, I want the user to be able to trigger a second modal from within the first modal and have both modals function independently of each other. What I am trying to achieve:...

create stacked bar chart with apexcharts

Hi everyone, i am asking how creating a stacked bar chart with apexchart? thanks
Solution:

hours input

Can someone build me a clean hours input? Will pay to have this done asap. I need something nice and clean like this.
No description

How to refer to filament semantic color in blade file?

This is a example filament button component, which render a button with the 'success' color. The 'success' then can be set up to be whatever color from tailwind. ``` <x-filament::button color="success"> New Button </x-filament::button>...