Filament

F

Filament

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

Join

filament shield Bezhan Salleh

I'm trying to generate policies in my Laravel project, but I'm encountering this error: The given role or permission should use guard web instead of super_admin. It seems that I'm assigning a role or permission that was created with the super_admin guard to a user who is authenticated via the web guard. This causes a mismatch. ...

<x-filament::grid

Hey everyone, im getting this error in one of my blade files: Unable to locate a class or view for component [filament::grid]. Does it not exist anymore or did they changed the way how to use it?

FileUpload Vimeo

Hi! I am planning to use the fileupload form to upload videos on vimeo using their API.. how will I achieve this? should i store first the video then upload it on vimeo and also how can I display the uploadd video when editing the record?

Render Hook for navigation items

I want a render hook that allows me add livewire components for each navigation item (such as an action as the photo show). is it possible now? or need some changes in the view files?
No description

Filament 4

I get intellisense errors when using stuff like ->label(), ->hiddenlabel() ->default(), Anyone know a fix for vscode?

Set default value for search, or how to resolve ID of a record in select

Hi, I have select that corresponds to One-To-Many relationship and it stores ID of a related record in table of current model, for which form I'm trying to build... But when user loads the page with already selected related record, only ID shows to him and it is not resolved in the getSearchResultsUsing. Do you know how would I be able to resolve this ID that shows to user, I was thinking maybe adding some default search value, but I don't know how to pass current record ID....
Solution:
Make the course a relationship on the model and don't use ID. Then you can use ->relationship() on the select which will load everything as expected.
No description

Error "No hint path defined for [filament-schemas]" after upgrading to v4

Using the upgrade guide I'm attempting to update our Filament app to v4. On each page I getting the following error and crash. Does anyone have a clue to fix this? Thanks in advance!...

Disable "Create & create another" checkbox in createOptionForm modal (Filament 4.x)

I am using Filament latest 4.x beta and trying to disable the "Create & create another" checkbox in a createOptionForm() modal. ``` Select::make('categories') ->relationship('categories', 'name')...

Using relationManager without panels and resources

What I am trying to do: using relationManager but without panels and resources (as livewire component) What I did: i did like what i did when using relationManager and resources, but it doesn't show anything My issue: is there any manual to use relationManager as livewire component ?...

Richeditor v4, set default height

Hi I am wondering if there is a good way to set the defualt height (rows) of a richeditor in v4? I tried doing
RichEditor::make('description')
->json()
->extraAttributes(['style' => 'min-height: 18em;'])
RichEditor::make('description')
->json()
->extraAttributes(['style' => 'min-height: 18em;'])
which works, but only the first line is clickable/focusable - so its a bit confusing for the user....
Solution:
RichEditor::make('description') ->json() ->extraAttributes(['class' => 'custom-rich-editor'])...

Filament v4 preventing Wizard submit on enter

https://github.com/filamentphp/filament/issues/13779 I want to see if I can create a Wizard that does not submit when the user hits enter on any step. Did anyone figure it out? What should I add or change in my wizard? Right now hitting enter on the first step tries to call create. ``` <?php...
Solution:
Think I got it, it only works when using HasWizard, not with Components\Wizard https://filamentphp.com/docs/4.x/resources/creating-records#using-a-wizard

Action with custom login

How to make full image button on custom login page ? now svg not resizeable --- Action::make('digitalLogin') ->label('Digital Login')...
No description

Filtering Enum Options

How would one filter enum options? I don't want to include all enum options; only a subset. ```php ToggleButtons::make('recipient') ->options([...

Testing modal form fields.

Given an action with a modal, with a form schema, I'd like to test that the form has specific fields. How is that done? Example action ```php Action::make('export')...

Is it possible to add draggable sorting similar to livewire in Filament?

I wanted to implement a similar instance of draggable similar to how livewire does it. Is this possible in Filament? AS you see in the image there is 3 bars all over the table and rows and you can drag an item and change the order....
No description

[V4] InfoList with forms in Filament modals!

I'm trying to make the modal with filament form and text entry together. Is that possible? Upper top of the modal is text entry or custom text entry, bottom is form input.
Solution:
No that's replacing an entire modals content. On an action you can do: ->form() ...

Unique validation rule not applicable to db index

in my migration file i have applied a unique constraint to the email column of my user model. when trying to addionally apply a frontend validation in the user resource using the unique function, i get no result. thus i am still able to insert duplicat emails resulting in an sql error. ``` Schema::create('users', function (Blueprint $table) { $table->id();...

Relations Manager make the Edit page as a Tab?

How do I make the form inside the tab instead? So in the tabs I can have Group, Departments, Users ?...
No description

Alt-text for Spatie Medialibrary File Upload

I'm using Spatie Medialibrary to handle my uploads. However I just noticed there is no way to set the alt-text of an image when I use SpatieMediaLibraryFileUpload. How do I implement a way to add alt-text to an image through SpatieMediaLibraryFileUpload? It's so weird there is no built-in way to do this, especially since the new accessibility laws in EU will take effect soon....