Filament

F

Filament

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

Join Server
SSkent2/21/2024

Get form values in beforeCreate() hook

So I have a resource and in the create the user is presented with two radio options "Property" with option X and Y and "Vehicle" with option X and Y Before the record is created I want to make sure the user has picked either 1 Property or 1 Vehicle (One in each cannot be selected only one across both radio options) Is there a way to do this in validation (if its easier)...
Solution:
Figured it out using protected function handleRecordCreation(array $data): Model instead...
Ggladjanus432/21/2024

Password reset for different user model

I have setup a different user model for a separate panel called customer. It all works correct, but I cannot get the passwordReset method to work. This is the new Customer model. ```php use Filament\Models\Contracts\FilamentUser;...
Nneon20272/21/2024

Problem with installation of filament packages

I try installing the laravel filement but it keeps on showing this problem
Solution:
I can see you are usign laragon, you can add the php-zip extension there by right clicking the laragon icon > php > extensions > click on the zip option
No description
BBOT_Larry2/21/2024

Use Action inside a custom field

Hello, i have a error in my custom field, because i have 2 form submit buttons. Field: ```php class ObjectPaymentFunction extends Field {...
Eericmp2/21/2024

How to change table recordKey?

I published the sessions table. I created a filament resource for the sessions table. The issue comes when i try to delete multiple rows via it's table. It just deletes them all....
SSaturn2/21/2024

Grid View on custom page

I made a custom page where ill be showing all the images related to the particular row. In simple words there is a product and it has different images i have custom page where i display this different images.
For now i aligned those images using css grid i want those image to be draggable and change their position. Is there any way to do that like a grid image and those image can rearrange....
Ffabrice2/21/2024

MarkdownEditor feat Spatie Media Library

Hi! I tried to custom image upload of MarkdownEditor forms component and use Spatie Media Library package for all uploaded images. Following code doesn't work but on create (throw $record is null) ...
DDianaMujoiu2/21/2024

Delete confirmation repeater

Hello, everyone. Is there a way to add a delete confirmation when the user wants to delete a repeater item?
Solution:
Oh, I found this action deleteAction( fn (Action $action) => $action->requiresConfirmation(), )...
Kkian2/21/2024

unable to call method

I am new to filament, and got assigned to a project to make a custom field for searching location through google maps api. I am getting a little stick here. I'm using
$wire.newLocations($event.target.value)
$wire.newLocations($event.target.value)
to try and call a method in my component class (GeoMap), but keep getting this error Unable to call component method. Public method [newLocations] not found on component. When I post this method in my CreateLocation class it does work however. What is the reason for this, and how can I fix this? ```php...
Ggigiloouu2/21/2024

foreach() argument must be of type array|object, null given

i have no idea why i have thiss error, im not using foreach just when im going
pay
pay
page i have this error: foreach() argument must be of type array|object, null given maybe someone has this experience...
DDex2/21/2024

Override getTableKeyRecord function

Is it possible to override this function, because I am using a view from another connection without indexes, so filament doesnt like that. I found out that I can just rewrite like ```php...
WWillThatch2/21/2024

create modal that can trigger via custom view blade

I have a custom view blade Infolists\Components\View::make('components.project-material-request-header'), how can i create a modal and trigger from this blade file?
KKarlisJ2/21/2024

prefix url for resource

Given I have UserResource for Admin panel, by default the url will be /admin/users . I can change the slug but it will only change the users part of url. I need /admin/prefix/users . Can this be achieved?
DDionysis2/21/2024

CreateRecord Resource Page with custom mount options

Greetings, I am making a page which generates a custom form based on the form slug given within the URL. While it works with a custom page, I was wondering if it's possible to replace the default mount of a CreateRecord page so I can keep its original functionality I would like to mention, that everything is saved into an answers JSON column, there are no dynamic properties...
Jjlove2/21/2024

Render multiple relationship manager on one page

Hey is it possible to render multiple relationship managers one after the other on the same page without the tabs?
Sspacedev2/21/2024

Issue with ExportAction on table with defaultSort() on a relationship attribute

Hello, while trying to export this table data we get this error: `Next Illuminate\Database\QueryException: SQLSTATE[42P10]: Invalid column reference: 7 ERROR: SELECT DISTINCT ON expressions must match initial ORDER BY expressions...
BBala2/21/2024

CreateAction modal customization

How do i use layouts such as Grid or section inside createAction modal
Jjepewsykes2/21/2024

Got this error when adding action modal to form inside custom page

DatePicker::make('tanggal_ap'), DatePicker::make('tanggal_faktur'), TextInput::make('faktur_pajak'), Action::make('import')...
No description
Mmustafa_m16722/21/2024

How customer facing app is supposed to interact with Laravel app built with Filament?

Lets say you created admin panel using Filament. Great. How the customer facing frontend (built in React/Vue etc.) is supposed to interact with the app/database (creating orders, making payment etc.)? The actual data that admin is supposed to see. 1. Rest API? This doesn't seem feasible as Filament/Livewire is Laravel full-stack app which is server rendered. 2. Then no other option but to create Filament/Livewire/Blade views in the Filament application itself right? Then how to neatly Segregate routes/controllers/views etc. What am I missing here? Clearly admin panel won't exist in void but nowhere I see mention of how to integrate the actual user facing app!...
Sspacedev2/21/2024

Export Error SQLSTATE[25P02]

Hello, is anyone facing this error using Filament ExportAction? SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block I'm using PostgreSQL and QUEUE_CONNECTION=sync....
Next