Filament

F

Filament

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

Join

Optimize duplicate queries in 2 method at the same TextColumn Class

Can someone help me to optimize with this case, TextColumn::make('jenisDonasi.nama_jenis') ->tooltip(function ($record) { if ($record->campaign) {...

Sticky Action Column

Is there any solution about this I need to do something like this pic because I have to much columns and I need to be shown always the actions
Solution:
```css .fi-ta-header-cell:last-of-type { @apply relative right-0 top-0 bottom-0 bg-red-500; } ...
No description

Split in table

Hello all, I have a column in table which contains a photo, name and email, now I want to show them as the attached photo (image on the left and text in the right). Anyone can help?...
No description

Wizard not submitting data on final step

Hi. I'm having a problem with a Wizard. It has four data entry steps and a final Review step consisting of just placeholders. I need to customise the model creation process at the end which I'm doing with handleRecordCreation in my Page class. If I include the final Review step, the $data being supplied to the Page class is empty. If I remove the Review step, the $data contains everything from all steps....
Solution:
aha - it wasn't that but it did point me in the right direction. The problem was not the uniqueness of the Placeholder name, it was using the same name for Placeholders as the Form state name. So using Placeholder::make('name') killed the form state for TextInput::make('name'). thanks for taking the time to look...
No description

Achieving Roles & Permissions in Multi-Tenancy

Hi everyone, How to achieve roles and permissions in a multi-tenancy environment. Thank you so much in advance....

Attach & attach another action label in relationship attach modal, can it be changed?

The concept of attaching and detaching is confusing to some of my users, however, they are the default options shown for any actions on a many-to-many relationship manager on a filament resource. I tend to change them to Add and Remove to make it clearer. I am able to change the text pretty much everywhere except for the "Attach & attach another" button in the modal. The singular "Attach" button is changed to "Add" in the screenshot using "modalSubmitActionLabel" method, but it doesn't also change the other submit button "Attach & attach another". Can anyone suggest how I might do this?...
No description

custom table bulk action assign to a customer screen become unresponsive

When selecting 20000+ records for from my number resource to assign a customer screen become unresponsive

Dropdown Shadow on Components

on the box/component, how can i put drop shadow on that using custom theme, like this: https://imgur.com/a/rlnroZt thank you....
No description

Add script to a page

How can i added script to a certain page i dont want to add it globally only a script for one page
Solution:
use Filament\Support\Facades\FilamentView; use Filament\View\PanelsRenderHook; use Illuminate\Support\Facades\Blade; FilamentView::registerRenderHook(...

How do I render a livewire modal in my createResource????

I'm having a problem rendering my create button on my form, how do I solve it? My first experience with livewire and filament my code below: Resource:...

How to hide a column in a table using Filament Shield?

I have the roles set up, but i want to hide a specific column based on role
Solution:
Figured it out ->visible(fn() => auth()->user()->hasRole('super_admin'))...

Clearing model cache of Laravel Filament?

Hello, I have this weird bug so I'm using filament's resource and relation managers. Though in the relation manager I've modified the query to based on the owner record's relation query ($owner->relation()->where()->getQuery()). So now it works properly, it fetches the data I want. ...

Default active tab

I want to turn a tab default, i've already used ->default() and -isActive() and it doesn´t work
No description

I have a NFC reader JavaScript function, which I want to implement inside a Filament Form.

So the JS function basically reads the NFC card, and prints the data into a field. That's exactly what I want inside the form.

Is there a way to define a Guard instead of binding Authenticatable class?

Long story short, my default Authenticatable class resolves guard that I use on the frontend, not in my filament panel. And I need to define a guard that will be used in exports. But I dont want to bind to AUthenticable class because I dont want to change all the auth() calls in the frontend....
No description

❓How to I embed a table in a form?

The enclosed pic is from an am I wrote decades ago. I'd like to convert it to Laravel using Filament. The app tracks Families and the People that belong to the Family, as well as a few other things. Thus, this is a classic "Family HasMany People" relationship. My question is about having a form to edit the Family and, on the same page, being able to have a small table for the People that allows for CRUD on the People related to the Family. I call this relationship a "Portal", but it may have a better name in Filament. While my UI is clunky, the UX is very helpful in that the Family record is "glanceable" - you can see all the local Family fields as well as the relationship fields. Of course, when you look at a Person (not shown here), you see the opposite - the relationship to the Family....
No description

What is the best way to conditionally hide a tab in the ListResource page?

I have a resource called SubjectResource, where I have a number of tabs and each of it modifies the query in a certain way. Based on the user role, I need to hide most of the tabs. How do I accomplish that? I have installed the plugin "Shield" to handle roles. Thank you!...
Solution:
->extraAttributes(['style' => auth()->user()->can('view_this') ? '' : 'display: none;'])

I am unable to upload images after deploying Filament Admin panel on server

I’ve deployed my Laravel app on a DigitalOcean server, but I’ve had to use a slightly different folder structure for the public and other Laravel files: Public files: https://example.com/html/my-project/my-first-filament-app/ Laravel app files: https://example.com/laravel/my-project/ ...
No description

chart size

i have problem card in my chart cropped, when i try inspect my chart has have 8 rem for height, how to i can fix it?
Solution:
composer update
No description

Panel heading / info block?

Is there a way to put information/panel notes/etc.. at the top of a panel table?
No description