Filament

F

Filament

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

Join

TextEntry as link to related resource

What's the easiest way to make Infolists\Components\TextEntry::make('client.name') link to the client's view page?
Solution:
->url(fn($record) => route('my_view', ['id' => $record->id]) or along them lines?...

Middleware not working

I'm having an issue with some middlewear I'm trying to add into my system, but it looks like the middelwear is not even being used. I created a EnsureTrialNotExpired middlewear, and inside that middlewear I've just added a DD or a log to see any output and its not showing anything. Just navigates to the panel as intended if the middlewear wasn't there....
Solution:
php artisan optimize:clear ?

Form builder - general validation error?

Hello 👋 New to Filament here, working my first real project! 🎉 I'm getting stuck on what seems to be an easy issue, so not sure if I'm getting things wrong, or simply not finding the required info (been on this for 3hrs already 😢 ). What I'm trying to do is generate a global form error, is that possible? In this instance, I'm checking if any of my fields are filled, if not I want to display a validation error (globally). Looked through $form->... couldn't find anything. Then found mutateFormDataBeforeCreate() on CreateClientContact but something doesn't feel right, really feel like I'm missing something obvious here?...

Modal Heading on Delete function

Does anyone know why on that h2 tag has me-5 CSS class? I've check on the filament demo it should be not have that class.
Solution:
i's fixed in the new version 3.2.132
No description

Route [login] not defined Error After Password Update in Filament

After implementing a profile edit feature in Filament, I'm encountering an issue where updating the password leads to session loss and a "Route [login] not defined" error. does anyone have the same problem?
Solution:
try ```php $user->update($data); if ($user->wasChanged('password')) {...

how can disable the createAction If?

I need to block the Create User button if the logged in user does not have an associated business, I want the button to be visible but when clicked it does not redirect and shows a Filament Notification, I tried this code but it does not work for me, it does not go through the validation, I tried with dd() but it still doesn't happen, is there something I'm forgetting or missing? This is my code! ``` <?php namespace App\Filament\Resources\UserResource\Pages; ...

Failing test when calling testing a table action

I encounter a failing test when testing a custom table action. Specifically, the test fails on the final assertion when I call the update method on a model before invoking the callTableAction method. Problem: The test fails on the final expectation, but the table action works correctly in the browser. Also, I have other tests with custom table actions that pass once nothing is called before invoking the callTableAction. ...

Filament handling encryption and decryption

When using the encrypted cast in a model, does filament handle the encryption and decryption states automatically, or do I have to do this manually? Do I have to do this myself, according to the Laravel documentation example for encrypting data? https://laravel.com/docs/11.x/encryption#using-the-encrypter...

Does anyone know how to fix this error "ERROR Command "filament:optimize" is not defined"?

php artisan filament:optimize ERROR Command "filament:optimize" is not defined. Did you mean one of these? ⇂ filament:assets...

High level suggestions for building a Frontend form builder?

We're using Filmanet as a CMS for our Nextjs frontend. What we need is the ability to create custom completely arbitrary Inquiry forms that will be shown on the frontend. This seemed simple enough for me, just using a Builder and blocks for the input types, but it gets a bit complicated with dependent fields...

Dependant Select with Repeater cann't work

hi, i try make dependant select in repeater but cann't work, any solution for get data product in repeater where $get('supplier_id')?...
No description

DatePicker behaviour

Hello, I have some DatePicker filters on my Filament page. Currently, the filters automatically refresh the page content (charts, tables, etc.) whenever a change is made. Is there a way to prevent this auto-refresh and only update the content after clicking an “Apply Filters” button? Thank you!...

auto refresh filament page when changing code?

hello, i'm using vite and filamentphp, but when i edit something, say for example adding a form component, i have to manually go back to the browser and refresh the page. is this auto refresh not supported in filament or am i doing something wrong? here's my vite.config.js file ```js import { defineConfig } from "vite";...

Filament Select with Relationship: Custom Label for titleAttribute Options

Hello, when i create transaction and add purchase_details and i want show the titleAttribute or label name by product.name, motorcycle_type.name, brand.name and product_detail.code.name, can u help me to solve it?...
No description

->searchable() pages blank

I want to create a search feature but every time I do it, the pages are blank.

Trying to dynamically disable file input, when checkbox is checked

Hi guys, I have this code that will make the favicon the same as the logo when the checkbox is checked. If this is checked I want to disable the file input for favicon. Don't worry about the TenantFileUpload it is exactly the same as FileUpload just with changed saving. ```php return [...

I have a livewire event handler on my resource create and edit pages like this:

``` #[On('copyToText')] public function handleCopyToText($content): void { $this->data['text_content'] = $content;...
Solution:
Ah, got there: ``` #[On('copyToText')] public function handleCopyToText($content): void...

make pages load with progressbar?

hello, you can get this progressbar when you change pages with inertiajs+laravel, which gives you a sense that the page is loading faster compared to filamentphp's page going dark then showing the clicked page. is there a way to achieve this in filamentphp? is it even possible considering it uses livewire?...
Solution:
In your panel Use ->spa()...
No description

Remove FileUpload delay/debounce

I am using the Forms\Components\FileUpload component in a form. Hovever, even when the file is 1kb, the upload process takes about 2 seconds. In this time, the browser shows no outgoing request. When this happens, the upload itself takes 28ms. Why is the UI waiting so long to perform the request? ->debounce(0) helped to reduce it by 1 seconds, but it seems this wasn't it all. I want a fast and snappy as possible expericence....

Table Polling

I have a filament table with live statistics of some servers, is it possible to add constant polling to the Table?
Solution:
$table->poll()