Filament

F

Filament

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

Join

fileUpload break when hidden via javascript

hello everyone, Im am making an livewire component with filament forms. I made multiple forms in it and I use aplineJS to switch from form to form. but when the first page is loaded the first form fileUpload works properly, but when I go to an other forms it doesn't work. the fileUpload shows the uploaded image but shows like it doesn't have it (see images for example). Can some one help me with this....
No description

Reset Table Widget Pagination

I have encountered an issue when filtering a custom dashboard page in my Filament panel. When I apply a filter I would like the pagination to return to the first page / be reset. I believe I have tried all of the options available to me but it appears that I am unable to access the correct pagination instance....
Solution:
This is now fixed. In my case, I had made a mistake extending the TableWidget class. Once fixed, I was able to dispatch an event from the header filter action and listen to that elsewhere in the codebase. Once triggered, the listener can correctly call resetPage on the table widget.

Adjusting Filament Chart Widgets in Laravel Breeze?

I want to use a few Filament Charts in the front end which is using Laravel Breeze. The problem is they look great in Filament, but I want to adjust the coloring etc when displayed in Laravel Breeze. For example, I want to change the color of the trend line from dark/black to match the indigo of the front end (And likewise choose a dark mode color)
@livewire(App\Filament\Resources\UserResource\Widgets\ActiveUsersChartWidget::class, ['team' => $team])
@livewire(App\Filament\Resources\UserResource\Widgets\ActiveUsersChartWidget::class, ['team' => $team])
...
No description

Having TextInput in CreateAction breaks closing modals by clicking outside

Hi! I have a livewire-component where i have built a filament form. Clicking the "Add new"-button in the top opens a modal, and i can close it by clicking escape, close-button or the X in the top right corner so thats great. But i cant make it close by clicking outside the modal - this should be standard behavior from the Filament docs. The delete-modal works as expected and closes when i click outside it. Here is the code:...

Get the parent id inside child repeater form

I have a nested form using repeater like, main form -> child repeater form -> grandchild repeater form. Here I need to take the id of main form and insert into grandchild table as main_form_id. I have tried few solutions but not working, This is my form, ``` return $form ->schema([...

RecordCheckboxPosition

How to implement this functionality? Any body used it to choose records from table of records?

Alpine Expression Error: error is not defined when using fileupload

Why I got error in console, said: "Alpine Expression Error: error is not defined" When I'm using Fileupload, with only method required() at it?...

FileUpload on custom Livewire page won't render properly

Hey,  I am trying to create a custom page to upload suggestions. You should be able to upload multiple files for their suggestions, and here is the Problem. As soon as someone uploads one or multiple files, the FileUpload warps and doesn't render properly (see attached picture). ...
Solution:
Hey, I fixed the problem. Apparently something went wrong with the upgrade from Filament v2 to Filament v3 I created the entire Project with Filament v3 and the render problem is gone....
No description

Is it possible to add validation to a `Action::make()` before opening the confirmation modal?

I have added a header action to my table, where I have tried to add validation in the ->before() lifecycle hook: ```php Action::make('acceptAll') ->before(function ($action, $livewire) { Log::debug('Before hook');...

adding multiple categories in ProductResource error

When i add multiple categories in the ProductResource, it saves them. But on the edit page the categories are removed. this is the code in the product model: ```public function category(): BelongsToMany...
No description

adding multiple categories to product

when i add multiple categories tothe product it saves. But when i go to the edit page the categories are removed, so i have to add them again. in the product model i have added this: ' public function category(): BelongsToMany...
No description

TextInputColumn (date) submit too fast

Hi all 👋 I have a resource with an “expiry date” table. To go faster, I wanted to add a TextInputColumn to my table so that I could just change the date without having to go through a modal or an edit page. So I did the following: ```php...

filters

Iam using SelectFilter in resource, while selecting item in a filter the table data not filtering, only when i reload the page that time only filtering, why like this? and my code will be like `->filters([ SelectFilter::make('day_id') ->label('Day') ->options(fn () => WeekDay::whereNot('id', config('constants.weekend_day.sunday'))->get()->pluck('name', 'id')->toArray()) ->query(function (Builder $query, array $data) {...

Call modal record view from anywhere.

Hi there. I really appreciate the hard work of the creators and every one who contributed for this amazing package. I'm curious how can I call the modal infolist from anywhere in the app? ...
Solution:
You would use your ListPage instead ManageXx page. You would mount view action instead edit in that code

Pagination Error 'Incorrect syntax near OFFSET' using SQL Server

I am developing a project using Filament 3 and Laravel 11 with SQL Server as the database. I'm using the default table provided by Filament, and since the dataset is large, I tried implementing the default pagination. However, when I tested it, I encountered an error: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server] Incorrect syntax near 'OFFSET'. (Please refer to the attached screenshot for details.)...
No description

How to create a custom page for additional reports?

How to create a custom page for additional reports / widgets?

Calling refreshFormData on repeater clears them

I have an action that is defined like this: ```php // app/Filament/Resources/FeedbackResource/Pages/EditFeedback.php <?php...
Solution:
use fillForm() instead ```php $this->record->performSentimentAnalysisUsingAI(); $this->fillForm();...

Adding a button to the footer of the form

I'm Brazilian and I have a problem. I would like to add a button to the create side of the form, this button should open a modal (Custom modal with livewire). How do I do this? Figma example:
No description

Modal resource editing

Is there a possibility to call a Filament modal from Alpinejs, where i can edit or create a resource?

Dynamic Form Field Disabling with Alpine.js in FilamentPHP

Dynamic Form Field Disabling with Alpine.js in FilamentPHP Hi everyone, I’m working on a project using FilamentPHP and need help with dynamically disabling form fields on the EditRecord page using Alpine.js. I’m trying to add a button to toggle the disabled state for all fields on the page....
No description