Filament

F

Filament

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

Join

Creating UUID (PK) in form

Hi folks, I require the UUID (which is the primary-key of my model, id) to be known before the user submits the form, as this will edit another field. Is there a way I can generate this UUID, set it to a TextInput, then use that as the primary ID? Thanks in advance.

Change widget icon color

Is it possible to change the color on the widget icons ?
Solution:
You can add an extra attribute (class or id) to your stat widget and then use the child combinator ( > ), for instance: ```php ... ... ->extraAttributes([...
No description

I suddenly got issue on Repeater after running composer update

```php Repeater::make('transfers') ->schema([ Forms\Components\Select::make('transfer_type') ->options([...
No description

Avoid ID in edit page

I need to use the edit page of my plugin without the ID is it possible? ``` 'edit' => Pages\EditSettings::route('/{record}/edit'), should be...

Find a reporting system that allows for CRUD

I've found lots of reporting tools that let you hard-code a report, both in Laravel, Filament, and plain PHP, but what I am looking for is code that gives a friendly UI, allows the user to pick fields from various SQL tables, add filters, save the report, and of course display it. Essentially, I want a CRUD-like interface to let users create their own reports, but have a friendly (no actual field names displayed) UI. I wrote something to do this 12 yrs ago, but I don't want to port it into Laravel/Filament as it has bad UI and only supports AND clauses between JOINed tables....

Policies for ManageRelatedRecords only

So in my Model, I have a class that extends ManageRelatedRecords, and is for managing users under that model. I only want to allow the attaching and detaching under that Model, but still hiding access to users as a whole navigation, which I cant do, even when in the Manager class, I define the canViewAny method...

How do apply css on modal submit Action

I want to remove modal submit action left and right padding. ```<?php ->actions([ Tables\Actions\Action::make('Subscribe') ->button()...
No description

Modal closing on search

I have a modal which loads a component which includes a filament table. Some fields are searchable. When I type to search, the table is automatically updated ✅ However, if I type a search term and hit enter, the modal is closed ❌ I set all the following options to prove none of them are triggering it, but it still closes. ```php...

$data does not contain Detail Data from Repeater

I have Master Detail create form with Repeater to handle the detail data input. How can I access the detail data in the repeater before and after save? here is the code of the repeater: ``` Repeater::make('details')...

Google maps style text input

Hi, I'm trying to make a TextInput in a form make a call to a Nominatim (OSM) api that I've setup myself. I need to type an address into the input and the possible results should load below in a Select input. Ideally, they'd be together in the same input. I'm not entirely sure how I could do this with filament. Any ideas?

Label for Table Actions

Hi is there any solution to add Actions label in table for example now in the columns does not have any label I need to add "Actions" as a label in column
Solution:
Add ->actionsColumnLabel('Actions') to the $table

Concatenated data in select

Hello everyone. I have the following question. Can the concatenated data of several fields of the obtained record be displayed in a filament select? Regards...

soft delete modify query using

When a resource table is setup to use modifyQueryUsing(). how can I make it still filter with the trashed() functionality from the filter section?

Issue: Filament Shield - Permissions and Roles for Models Without Filament Resources Not Visible or

in Filament Shield, where permissions and roles for models that do not have Filament resources are not visible or manageable in the Shield interface. Even if permissions and roles are successfully created manually using Spatie Permission, they still do not appear in Filament Shield
No description

MorphToMany Select Relationship

Im getting completely frazzled with MorphToMany setup in a select instance. I have a User that Morphs to Many Organisation and Product. Im trying to merge the items into a single Select, and I have it working, except when trying to edit a user, I cant get it to show the already existing records as already selected values. I found this function...
Solution:
Ah, I figured it out, I don't return it, I attach to $component->state();

Autofill TextInput based on Select value in FilamentPhp

I am developing a project in FilamentPhp and I have encountered the following problem that I do not know how to solve. I would like to be able to auto-complete a TextInput dynamically depending on the value I select in a Select, that is, the logic would be the following: I select an option from the Select...
Solution:
This is possible, check the following over the docs: - Form reactivity - live() method: https://filamentphp.com/docs/3.x/forms/advanced#the-basics-of-reactivity - Set the state of another field: https://filamentphp.com/docs/3.x/forms/advanced#injecting-a-function-to-set-the-state-of-another-field...

Table ImageColumn only for certain rows

I'm creating a leaderboard table and would like the first 3 rows to have an image instead of text position (1,2,3). Is it possible? Any idea? thnks...
Solution:
I solved it definitively with a ViewColumn and a custom view

Make the topbar backdrop blur

Good day guys. How can i make the fi-topbar blur? .fi .fi-topbar { @apply backdrop-blur-sm; }...

Dispatching a livewire modal from Action in a Table

Hello, i am trying to open a custom livewire modal from an action inside a table i have in a resource. ``` Action::make('modal_with_voucher_details') ->label('Show')...

update value

I have an issue with modifying textarea field by javascipt i wrote a function i call it on the change of a drop down and I add value of select to the textarea this function works properly and the value of select dynamically added to textarea while changing. the issue is when i submit the form i cant get the modified data in database and only data typed directly in the textarea stored in db what is the issue? Translate::make() ->locales(['fa', 'en']) ->columnSpanFull() ->columns(2)...