Filament

F

Filament

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

Join

Help on how to take field values and use them inside Repeater::make fields

I want to take the ID from user_id and work with it in the products field Forms\Components\Select::make('user_id') ->label('Client') ->options(function () { return \App\Models\User::whereHas('roles', function ($query) {...

Relation Manager creating

Hi, how to catch the Query exception while creating in relation manager modal? I can't find the correct action method to customize.

I want to change default table for user

I have a table called web_users before, and i want to adopt filament. Since the default table value is users, how can i change the login and auth implementation to web_users

Custom Field Send Multiple Data

I have to create a custom field and I have to send extra form data while submit the form with extra customization. like Here I make custom field by extending Rich Editor ```php CustomBio::make('bio') ->columnSpanFull(),...

Custom field with google map re-render problem

I have a custom form field with Google map inside it. The problem is when some other form fields, like select input with live modifier is changed form gets re rendered as expected, but google map disappears. How to prevent re-rendering of google maps element. I tried to add wire:ignore on the parent but that does not help...

modify the black background of the png image generated with the apexchart

Hi everyone, i am asking if there is a trick to modify the black background of the png image generated with the apexchart. thanks

Files Not Updating Properly After Git Pull

I'm working with a Laravel application that uses Filament and several packages like filament-shield and filament-exceptions. Everything works fine in my local development environment, but when I commit the changes to GitHub and pull them on the production server, some files don’t update correctly. For instance, my PanelAdminProvider file wasn't updated as expected, even though it works fine locally. Here are the steps I’m following: 1. I commit all my changes from the local environment to GitHub....
Solution:
ok. got it it was the filament cache php artisan filament:clear-cache-components < made it work...

JS not working on frontend with Fabricator Blocks

Hi, I am using the Fabricator plugin to create pages and blocks. When I create a new dynamic page with Fabricator, the CSS works on the frontend, but the JavaScript does not. In my AppServiceProvider, I am already compiling Vite, but I also created a default.php layout file. What am I doing wrong? Can someone help me? AppServiceProvider...

Change action priority in clickable rows

Due to Model policies i have View actions and Edit actions, but when i have View action it changes the priority from edit to view, is there any way of changing that behaviour?

DateRangePicker - disabledDates()

Hi guys, I have a problem with the update or the reactivity of the "disabledDates()" function. I would like to achieve the following. An item is selected in my BookingPosition-repeater, the DateRangePicker should then block the periods where the item already has bookings based on the selected item. Currently, I only see blocked periods if both the item and the date are already in the database. If I add a new position with the repeater, no date is loaded. What can I do about that?...
No description

Help! Unable to access variable values from .env

This is really bizarre. And perhaps more of a Laravel question now I think about it. But... My Filament app is able to connect to a database and display e.g. the APP_NAME - so I know that the .env file is present and has been read by Laravel /Filament core code. But - I cannot access the values from within e.g. a Widget. ...
Solution:
Ok so, just add this to the config/services.php file ```php ‘sharepoint’ => [ ‘tenant_id’ => env(‘SHAREPOINT_TENANT_ID’),...

Can Bulkaction buttons remain visible without being selected?

Can I make the buttons in the picture remain active without selecting anything in bulk action? I want the buttons to appear as active all the time....
No description

Modal Footer Action closes modal ,opens another modal then reset arguments

Hello. I am trying to have an action create a temporary record and then open another modal to fill extra data. So far I've made it work like so ```->action(function ($data, $arguments,$livewire, $action) { if($arguments['withoutSizes'] ?? false){...

Resource missing from Navigation Group

I have a brand new site which I adding resources too. I have just tried to add a Navigation Group to the resource but when I do, the group name shows but the resource is missing. This is the first time I have ever experienced this.

storage/media-library/temp

It appears my temporary upload files are not being cleared. Is there a command I should be running to do this?

Persistent bulk action

Hi, How to display bulk actions even if no row is selected? I know I can add them in header actions, but they dont look nice on right side above search....
No description

Have to click action twice in component

Hi all, Strange one - I have a table with an action. The action opens up my livewire component, which just contains a table (for now). The table in the component then has it's own actions (attach) with requires confirmation set. The issue I have is that I have to click the attach action twice in order for the confirmation to appear. As you can see in the video, the loading icon spins and then it does nothing. If I click again, it works as it should. ...
Solution:
Try @livewire('attach-modal', ['record' => $record, 'lazy' => true])

The model does not have a relationship named [team]

Hello all, how can I please fix this?
The model [App\Models\Backup] does not have a relationship named [team]. You can change the relationship being used by passing it to the [ownershipRelationship] argument of the [tenant()] method in configuration. You can change the relationship being used per-resource by setting it as the [$tenantOwnershipRelationshipName] static property on the [App\Filament\Resources\BackupResource] resource class.
The model [App\Models\Backup] does not have a relationship named [team]. You can change the relationship being used by passing it to the [ownershipRelationship] argument of the [tenant()] method in configuration. You can change the relationship being used per-resource by setting it as the [$tenantOwnershipRelationshipName] static property on the [App\Filament\Resources\BackupResource] resource class.
...
Solution:
add the team relationship to the back up model...

Sidebar action modal

Does anyone know if it is possible to add a button on the sidebar to open a modal for the contact form?
Solution:
Hi ! Something like this can help you ? ```php ->renderHook(PanelsRenderHook::SIDEBAR_NAV_START, fn() => Blade::render('<x-filament::button wire:click="$dispatch('open-modal', { id: 'contact-form-modal' })">Test</x-filament::button>')...

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.