Filament

F

Filament

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

Join

Custom Rule - Current record?

How do we access the current record in a custom rule on text input?
Solution:
ahh was stupid! Pass the current record into the function on the rules. opposed to the rule closure FYI.

I have an excess of queries in my Filament Table.

I'm bulding a product manager for my application. I have two tables: products and variants. One product has many variants. I'm using Filament 3.2.118 on Laravel 11 ```php class Product extends Model {...
Solution:
I found the problem 🤦‍♂️: I'm using: ```php $record->variants()->first()->price_value...
No description

tiptap editor + modal + block

I'm using TipTap editor and I'm encountering a problem related to modals when I use them in a custom block. When I go to edit a custom block that contains another TipTap editor, I can't use plugins that require a modal. In this case, the modal opens and I can enter a link or select a photo, but when I validate, there's a small freeze and the information is not reflected in the text. In summary, I have this problem only with the link plugin and the media plugin. The rest works fine....

Need help with installing.

i am trying to install filament panel but i get an error when trying to use these commands. command: composer require filament/filament:"^3.2" -W php artisan filament:install --panels...

Malformed UTF-8 characters, possibly incorrectly encoded

After a composer update I get the following exception “Malformed UTF-8 characters, possibly incorrectly encoded” when I try to submit a form. Nothing was changed, only an update was performed. Could someone tell me what could be the reason for this? All the best...

$get() not finding fields

Good morning, I have a filament form in a modal on a custom livewire page. I have a select field which is dependent on another select field. Nothing crazy, just use GET $get()... Atleast that's what I thought. Because its appearing to not find those fields for some reason. But I have no Idea what's going wrong. It is finding the "answer" field outside of the FieldSection, but all the fields within are simply nowhere to be seen. ```php...
No description

widget width "$columnSpan = 'full';" doesn't work with blade-templates

I changed my table widget from filament-widget component to a blade template. Now, the $columnSpan = 'full'; doesn't work anymore and the widget appears in 1 column. How can I expand it to be fullscreen?...
Solution:
<x-filament-widgets::widget> <x-filament::section> .... .... </x-filament::section>...
No description

How can I get the parent Resource from RelationManager class?

Hi. I'm having a UserResource class, which has the ContactRelationManager. In the Create/Edit/List pages of the UserResource, I can use method like: self::getResource() to point to the UserResource class. So, from the ContactRelationManager class, how can I get the full path of the UserResource class?...

Change fi-section class "p-6" to "pt-6"

I have a table widget with a custom blade-view to add tabs. I added filament sections - now I want to change a class of the section from "p-6" to "pt-6" to have the table "fullscreen" in the widget without a padding. But how?...
No description

Alpine js error, navigation group

Im trying to create navigation group, but the collapsible button is not working because the alpine js returns a null for the collapsible item. I have deleted all resources/views/vendor directory livewire.js?id=38dc8241:1120 Alpine Expression Error: Cannot read properties of null (reading 'includes') ...
No description

Relation manager with pivot table doesn't show pivot table field values when edit

Hello, I have these relation on my User and Cars entities: User entity:...

Select with Relationship showing no output

In all Select Form Components with Relationship there ius no result, event in selected used in Packages.
No description

Fileupload does not trigger camera on mobile CHROME

```FileUpload::make('image_path') ->label('Image') ->image() ->directory('uploads/images') ->maxSize(2048)...

Global filter...how to refresh on change though.

I want a kind of global filter. Users are allocated locations, and their resources can be filtered by locations. I want to give users the functionality to select one or more of their permitted locations, and then for all their resources to be filtered accordingly. So far I have worked out how to: ...
Solution:
Answer: ->afterStateUpdated(function (Component $livewire) { $livewire->dispatch('locationrefresh'); })...

TipTap Editor

Hi guys, is there a way for TipTap editor to have h1, h2, h3, h4 etc.. tags in toolbar?
No description

Help with Global Search in Filament Relation Manager without a Resource

What I am trying to do:
I have a ProfileResource that contains a PcoFormSubmissionsRelationManager, there is no standalone Filament Resource for PcoFormSubmissionsResource. I want to enable the global search feature in FilamentPHP to search and retrieve the values of these form submissions by way of the submissionValues field. What I did:
- If the PcoFormSubmission had its own Filament Resource, I would typically use protected static ?string $recordTitleAttribute = 'submissionValues'; to make it searchable....

$recordRouteKeyName does not apply to table row on-click and edit action

I've set protected static ?string $recordRouteKeyName = 'uid'; (which is a public identifier in favor of incremental identifier) on my Product resource. http://127.0.0.1:8000/products/01JABFVZ0BP27NBRZ4X0RF7A9N/edit now works as expected, but the table row and EditAction both still link to http://127.0.0.1:8000/products/2/edit on-click What am I missing here?...

Share state between nested modal

Hello, is it possible to share state between nested modals, my solution almost works but when i try to re-open child modal I cannot get parent one values to set as default: ```php Forms\Components\Section::make('Heading') ->collapsible()...
Solution:
This should work, in the action modal, use ->form([...])->mountUsing(function (Form $form, Forms\Get $get) { $form->fill([ 'color' => $get('heading.color') ?? 'something' ]); })...

Problem with Custom Form-Field Table in Filament Resource Form

I need some help with an issue I'm facing in a Filament resource form where I need to include an editable table. I know I can add a relationship table at the bottom of the form, but the client requested that the table be part of the form itself. To achieve this, I created a custom form field and embedded a Livewire component in the form-field Blade file that contains a table.  custom form-field in Resource Form:...
No description

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.