Filament

F

Filament

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

Join

Prevent old password as new password

I need help to tp prevent user entering the same old password as new password
Solution:
or ```php TextInput::make('password')->rules([ fn (): Closure => function (string $attribute, $value, Closure $fail) {...

rich editor accept filetypes?

Its possible in a Rich Editor field to define accept file-types? I want users to upload only images

I am using Api Service plugin, but don't know how to make validate token

Please give some sample how I make handle for Api authentication using Api Serivice plugin. I understand that it uses Sanctum, but I am so new on this. How to call with bearer token etc. I don't see this in the document. #rupadana-api-service
Solution:
Oh, sorry, didn't realized that hashtag is its chanel. Anyway, it's a sanctum part. I got how to use it now.

Ability to Extend Resource with Hooks?

I am reading through the documentation and I am trying to work out if it is possible to extend Resources with some form of Hook or Event. For example I have one package that I want it to inject data into another package. i.e....

Delete hover text

Hello dears, How can I delete the text when I hover on field form in filament? Your kind support is highly appreciate....
Solution:
As Dennis said, ->rules([โ€˜requiredโ€™]) instead of ->required()
No description

isLimited combined with getTableRecordActionUsing breaks

Using the table package, I created a table in a Livewire component. Everything works, until I add the combination of an expandableList and getTableRecordActionUsing() The problem is getTableRecordActionUsing() adds a wrapper button on every cell in the table, but the button to toggle isLimited, is put outside of this wrapper. Thus Alpine throwing an error because the isLimited alpine object, it outside of the scope of the "show more" button. ...

Table with action as a custom modal

I am looking for a way to create custom modal window (From Resource form )which has table inside and I want to choose one of the table row and fill the resource from. Is there any way to achieve this in Filament 3. { Tried creating custom live wore component as a modal , but cant get selected rows value back the the form. }

Why Repeater items are not sent to the backend ?

Here I change the model explicitly
->model(Product::class)
->model(Product::class)
```php class ManageProductClients extends ManageRelatedRecords { protected static string $resource = ProductResource::class;...

Deployment in a subfolder with Laravel and Filament PHP on shared hosting

I have build a simple property management application using Laravel 11 and Filament v3. I deployed the application in two places. Both on shared hosting. The only difference is one is deployed under a subdomain under public_html. So both applications are working one on is accessible on for example https://exampledomain.com and the other on https://testdomain.com/subfolder...

Disable some CRUD actions

If I want to disable edit and delete, so that routes like GET /admin/{model}/1/edit and POST /livewire/update cant even be accessed. How do you do that?...
Solution:
Just remove the routes and pages in your specific resource. You won't be able to remove livewire/update as filament is built on livewire and therefore needs that endpoint to be able to work at all....

Cannot get custom Validation Message for Select Component to work

I have the following Select component with the required validation. ```php Select::make('existing_kids') ->label('Select existing family members who will attending this event') ->required(function (Get $get) {...
Solution:
$this->form->getState() will validate the form
No description

Issue with Loading Videos in Filament When Switching Chapters

Hi everyone, I'm working on a learning management system and I'm facing an issue with loading videos in my Filament custom page. The video for the currentChapter loads fine initially, but when I switch chapters, new video doesn't load as expected. I have attached the code. Any kind of help would greatly be appreciated ๐Ÿ™...
No description

Unsaved alerts show always pops up even if no changes made - `mask(RawJs::make('$money($input)'))`

Package Panel builder Package Version v3.2.63...
Solution:
I guess mask modifies the state on the client side and therefore it think itโ€™s unsaved. Not sure whether we can solve this without increasing the complexity but you can still try submitting an issue.
No description

Is Filament only backend?

Hi, I am new here. Is Filament only for backend/admin panels or can I use it for frontend as well?
Solution:
As long as Livewire is okay for your frontend, you can use Filament for your frontend, too. The form and table builder can be used separately without the panel. But if it fits your use case you could also use a Panel as your "frontend".

An issue with loading JS when linking to the dashboard

For some reason, the JavaScript on the page doesn't load properly when navigating to the dashboard, as shown in the video, although it works fine upon refreshing. I just tested it on a freshly installed Laravel/Filament app, with npm run build + npm run dev Laravel Version ..... 11.19.0...
Solution:
Yeah. So nothing we can do about it. Not sure whether it's a "bug" or just not considered an option for SPA mode. I mean it's not really an SPA at that point anymore.

summarizer group label

Is there a way to add a tooltip to the group name? I use an enum for the status field and would like to show the enum description in a tool tip or something....

ttp://vf.test/livewire/upload-file?expires=1722885986&signature=ebe591d90830e2a98241184850295c95095a

Good evening! I am trying to set up file upload for a local development, right now I don't have a server. I am receiving an error that something wrong with livewire file upload in a filament 3 application. I had seen this error before on the internet, but I dont have php.ini or TrustProxy middleware so I dont know how to fix it. My file upload is a default filament 3 file upload. Maybe it will helps if i would say that I am using valet for my application development on linux 20.04. Error shows...
Solution:
I also use Valet so : I ran
valet on-latest-version
valet on-latest-version
and found I was down-level so I ran
composer global require laravel/valet
composer global require laravel/valet
and
valet install
valet install
per the instruction to get to the newest version now run
valet which-php
valet which-php
...
No description

Submitting form from Section header action

I'm trying to add some additional fields to a form, but it doesn't seem to be submitting. I have this in the action but $record seems to be null like it's not running mount: ``` ->action(function (array $data,Config $record) { $record->fill($data);...

Table Search Label

Hi, Is it possible to add label to table search input?
No description

$set Not working when using with a relationship

I have an Organisation Resource, an Organisation has one Location which is a mophOne relationship. With the code below I make it possible for the user to input just the postal_code and the number, I have an API which fetches the address based on those two fields. When the result get's back I fill the other fields with the $set() function as you can see. All of this works fine, the fields do get populated with the fetched data. But as soon as I press the save button on my resource, only the postal_code and the number get updated the other values reset to their original value before the $set happened ending up with an incorrect record in the database with the updated postal_code and number and the outdated street, city, province etc. Why isn't this working? How do I make this work? ```php...
Solution:
I have found the bug. The fields that get set with the $set function are disabled, somehow this prevents them from being updated... This is strange behavior, I want the api to populate those fields and don't want them to be changed by the user.