Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

Rich editor custom block and spatie media library

I have a richtext editor field, where I am using RichContentCustomBlock. One of these blocks should also use an image upload in the form of spatie media library field: ```php public static function configureEditorAction(Action $action): Action {...

How to test the schema state of a relationship manager that is a simple resource

What I am trying to do: I'm trying to test if the TextInput inside a form of a relation manager has a default value set. What I did: AddressResource is created with this command: php artisan make:filament-resource Address --simple...
Solution:
Apparently you just need to mount the action before calling assertSchemaStateSet:
->mountAction(TestAction::make(CreateAction::class)->table())
->mountAction(TestAction::make(CreateAction::class)->table())
...

Select relationship with max one query

I'm trying to have a select menu with about 10 options queried from a database. Which are searchable for easy selection. However, on each keystroke the searchable queries the database which leads to high loading times. So I want it to only query once. Using options with a pluck() would work if I didn't need the relationship to save my data afterwards. ```php Select::make('labels') ->label('Labels') ->relationship('labels', 'name')...

How to increase the background color of the notification color method in version4?

I show the success notification with the color method color('success') but it was over transparent so the user avatar shows underlay the notification so how to increase the opacity of background or how to use 950 of Color::Green in color method?

404 Laravel admin/login on production and 404 Apache after login locally

Hello everyone, I am using Filament V3 and everything is working fine when I use php artisan serve. Description of the problem:...

How to inject and display page title intro top navigation bar?

I'd like to display my page title inside top navigation bar, anyone know if that can be done?

Image Editor width

Hello, Image editor doesn't respect the the viewport width. any help?...
No description

Dynamic Form Inside Repeater isn't reactive

``` Select::make('type') ->required() ->default(QrContentType::Text) ->options(QrContentType::class)...

Panel on root path and separate page

does filament render its routes before web.php gets loaded? I've got a panel on the root path (->path('')), and I want to define a custom path. Is this even possible? My example:...

Is there a way to create a resource inside a directory?

I use: php artisan make:filament-resource -G --soft-deletes --panel=admin Sales\Brand This creates: App\Filament\Admin\Resources\Sales\Brands\BrandResource.php .......

Cant trigger action modals with wire:click

If I have a public function that returns a modal, I cant trigger it from blade using: wire:click="testModal" in v3 I had to do wire:click="mountAction('test') according to https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component#programmatically-triggering-actions Is that still the case for v4? I couldnt find this particular documentation...

File upload remove image doesn't update Image component

``` FileUpload::make('background_image') ->image() ->imageEditor() ->live(),...

Repeater and file upload

So, I have a repeater file upload in the resource, there is a hasMany relationship between articles and files, which is perfectly returned in the response. However, if I go to the given model in the filament in view or edit view, the uploaded file does not appear, why is this? I am attaching a picture of what the resource looks like.
No description

404 only when RelationManager enabled (tenant setup, policies applied)

Hi all, I’m stuck with Filament v4 returning 404 when a RelationManager is active. Setup - Laravel v12, Filament v4 - Multi-tenancy modeled with companies table (company_id) - Models:...
Solution:
fix in version 4.0.11

Prerender Image Component field

I created a qr generator function.. is it possible to use partiallyRenderComponentsAfterStateUpdated to partially render the qr image but unfortunately, we cant select the Image Component.. ``` ColorPicker::make('background_color') ->default('#ffffff') ->required()...

How can I have correct images

I have this file uploads with image display: ``` FileUpload::make('avatar') ->image() ->directory('avatar')...
No description

Is it possible to use modaltableselect in the attach action?

I have a relationship manager and when I click on the attach action I want it to open a modalTableSelect and be able to choose multiple rows. Is it possible?

How to call parent record in a nested form?

What I am trying to do: I have a AssignmentResource that is a nested resource of the ProjectResource . In my form I want to get the contacts of the project. What I did: Look at the code...
Solution:
PHPStan will give errors in Laravel natively, ensure you are using Laravels IDE Helper too. But the parentRecord is the recommended approach....

MergeTags in Richeditor

I made a custom component to fix dynamic content in v3(triggered using '[['), after updating to v4, I tried using mergeTags with Richeditor but triggered using '{{'. Is it possible to change the trigger from '{{' to '[[' in v4? https://filamentphp.com/docs/4.x/forms/rich-editor#using-merge-tags...

Testing Custom Header Delete or Save Actions

When testing a custom header action, I'm unable to validate the contents of the modal I'd like to surface to my users. Is there a schema I need to pass in to my TestAction that the header actions are associated with? The Action:...