Filament

F

Filament

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

Join

DeleteAction for Master & Detail in MyISAM

I have 2 tables (Both MyISAM):- Order - Master - Primary Key id (auto-increment) $table->id(); Order_Product - Detail - Composite Primary Key order_id (refer to Order.id) & id (auto-increment)...

What are these horizontal lines behind my Pie Chart?

Hi, I created a basic pie chart and I can't figure out why there is some horizontal lines behind the pie?...
Solution:
Ok I found out by myself out to disable them: ```php protected static ?array $options = [ 'scale' => false, ];...
No description

Livewire::make() return value?

I use Livewire Component in a Filament form to select some text I need in the form. How do I get the data back to the form?
Livewire::make(ViewResponses::class, function(GET $get) {
return ['record' => $get('client_id')];
}),
Livewire::make(ViewResponses::class, function(GET $get) {
return ['record' => $get('client_id')];
}),
...

get resource page name

Hello how to get page component name? I need to get the component name elsewhere to use it to dispatch events to Livewire. Livewire.dispatchTo(componentName ...
Solution:
damn i needed to call a static method ๐Ÿ˜…
No description

auto select records in table when table loaded

Hi every one i have user resource , and i want when ever list page loaded, automatically first and second record select for bulk action. Can any body help me!?...

Resource::getUrl(panel: 'server') still uses the wrong panel in spaUrlExceptions()

My app is using SPA problem is i have a blade with a component using wire:ignore which causes it to initialise twice when going backward/forward one page. This doesn't happen when i remove ->spa() from the PanelProvider so i thought i'd add it the page to spaUrlExceptions() Am i missing something ?...
No description

I'm trying to use recordClasses() to right-text some rows in a table

``` ->recordClasses(fn (Model $record) => match ($record->type) { 'incoming' => 'text-right', default => null, })...

Adding an action button alongside the New Record button in list view

How can I add an action button alongside the "New Currency" action in a list view? headerActions is adding it to a separate section at the top of the table.
No description

Forcing blur() on form field before save in RelationManager (double-click issue)

Hi, I'm having an issue with a form within a RelationManager in Filament v3. I'm using live(onBlur: true) on several form fields to dynamically recalculate values using afterStateUpdated and a custom calculator class. The problem is that if the user edits a field and then directly clicks the "Save" button (without clicking outside the field, i.e., without triggering blur()), the form doesn't submit on the first click. Only the second click actually submits the form. This is because the first click triggers the recalculations, but the actual form submission only happens on the second click. I'd like the form to submit on the first click, even if the user hasn't "blurred" the last edited field. ...

Help with custom field

I have a custom input field that works great in any normal form, but in a repeater, whenever a value is entered into one item in a repeater, the same value is applied to the field in all the other repeater items as well. I suspect that it's related to the blade file, but I have no idea how to go about fixing it. Even some steps to take to investigate would be super helpful. ```php @php...

Livewire component inside Tab not save changes

I haves this componte Livewire inside Tab: ```php Tabs\Tab::make('Inmuebles Cruzados') ->schema(fn (Opportunity $opportunity) => [...

V4 needed

Hi, I need to use the V4, because I need to develop tables getting the data from a service rather than a model. It's not a production project right now, but updating now to current v4 branch will allow me continue developing. It's possible use the v4 branch now? I have tried to install but I didn't get running, mainly:...

Rich Editor <p> tag

is it possible to remove <p> tag when saving or when displaying the content?
Solution:
I already solved it.. just for reference ``` <?php namespace App\Features\Filament\Fields;...

How to replace pre-compiled tailwind css file?

I will share all tailwindcss configurations within the application. Currently some extra css in the filament panel doesn't work properly. My vite css registered through renderhook is not overriding the styles correctly....

The role isn't being assigned?

I am trying to show options based on the role of the authenticated user. ```php Select::make('roles') ->dehydrated(true) ->options(function () {...
Solution:
Okay found it, ```php Forms\Components\Select::make('roles') ->relationship(...

Multicolor TextColumn Badge

Can I implement the colors in a TextColumn like this? - If so, how do I do that? - I have an array with the Spatie-Roles.
No description

Policy to allow admins to edit models in the admin panel

I am using the following code inside the policy class for the Duel model to prevent users from editing the model unless they are the opponent. However I want admins to be able to edit the model inside the filament panel. ``` /** * Determine whether the user can update the model. */...

Table filters Help

Is there a way to have $this->tablefilters update/save before page reload? I need to access the filter data after it is set but before the table is reloaded.

Login Form Fullwidth Issue After composer update

Hi everyone, After running composer update, the login form in my Filament project is now displaying as fullwidth instead of being properly centered and constrained. Before the update, the login form had a limited width, but now it stretches across the entire page. I havenโ€™t made any manual changes to the login view. I tried clearing the cache with:...

Filament relation manager and filament shield

Hello there, I have a little problem that I can't figure out if is from directly the relationmanager or the filament shield I have this 3 relations ```NotesRelationManager::class,...
Next