Filament

F

Filament

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

Join

Duplicate navigationbadge query with multitenancy

Hey, I'm using getNavigationFeature() in a FilamentPHP multitenancy app, like this: ```php...

Using repeater to create bulk inserts.

Hi Everyone, I am using repeater to insert bulk data but i am getting following error.
SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: daily_entries.publication_id (Connection: sqlite, SQL: insert into "daily_entries" ("client_id", "updated_at", "created_at") values (1, 2024-10-09 09:19:10, 2024-10-09 09:19:10))...
No description

Form Data is Not Saved When I Click the Print Button: How Do I Fix It?

I am entering new data during the wizard, but the data is old because it has not been updated yet, so the backend pulls the old data when printing. Do I have a chance to send this data to BE? Or how can I do this printing job in the form wizard with current data?
No description

deleteAny policy - prevent self deletion

When using the deleteAny policy to allow bulk deletion, how can I modify to prevent allowing the ability to bulk delete myself from the list

Reusing Action arguments in Livewire Action

I'm using a custom edit/update action to change a category's status in Livewire, passing the category ID from the Blade file. My challenge is reusing the category instance retrieved in mountUsing() to fill the form, and again in ->action() to avoid fetching it by ID twice. I also want to avoid using public properties in Livewire. ``` public function updatePublishStatusAction(): Action { return Action::make('updatePublishStatus')...

dynamic repeater fields names

Hello, is it possible to make the repeater fields names dynamic? something like: ...

Blank label and icon only on Action Button

When you have a regular action button with an icon only, and ->label('') you still get a <span class="fi-btn-label"> </span> , which means the button gets slightly elongated with the icon off centre. Anyone got a way to avoid that ?:...
Solution:
Annoying brain won't me ignore it. Potential solution, haven't checked it doesn't break other things yet, so at your own risk: ```.f-download-icon-button { span.fi-btn-label {...
No description

Is there any tips for exporting the rowIndex column?

I need to implement row's number on each table However, when I export using filament's export action, I can't figure out how to include the row numbers in the exported data. Is there any tips or guide how to do it? Thankyou...
No description

Is there any way that color can be used outside the filament panel?

I have a blog view and want to use the color in the filament panel.
Solution:
oh I forgot to use the filamentStyles.
No description

Table Background color based on status

is it possible to create this colorful table based on status ? such as in the image
No description

table inside tabs its possible?

hi im trying to recreate my app currently in native php to filament its like attached image it have tabs inside tabs and also a table with some invoice data from a mysql db. how i can achieve that? thank you...
No description

Browser refresh not working in new panel

I have created a new panel in my filament app on top of my admin panel. I have added a resource to my new panel, and it seems to work well. But I noticed that when I update my new panel resource code, the admin panel browser tabs are refreshing, but not my new panel browser tabs. So it seems I need to make an extra step to get browser refresh to work with my new panel when vite hot reloads. I could not find anything about this in the Filament documentation, any help is much appreciated....

Is it possible to render the raw html of a form?

So I want create a pdf file with the form of a resource, I'm using Laravel domPDF, so I can inject the raw html there and the pdf file will be built however I'm not sure how to get the raw html from a resource

search relation from resource in table throw error as name mismatch

I have 2 models #Model Item public function favorites() {...

Filtering widget data with HasFiltersForm on view resource page

I'm trying to use the Filtering widget data with HasFiltersForm on view resource page (Infolist). I currently put the use Filament\Pages\Dashboard\Concerns\HasFiltersForm; trait, and put the filtersForm method: ```php public function filtersForm(Form $form): Form {...

Separate bulkactions.

Hey guys, is it possible to improve the visualization of bulkaction? I would like to separate them by lines, as if they were categories. Bulkaction: ...
Solution:
I guess you could use a BulkActionGroup along with ->dropdown(false) something like that: ```php BulkActionGroup::make([...

Persist current tab while using Tabs Blade component

Hello, I am using Tabs Blade component inside the filament panel page, ```php...
Solution:
For those who are looking for this solution, There is no direct filament way to do this, you need some manual alpine to make this work. in page class,...

widget doesn't update properly from another property received with $listeners

Hello friends!! I have two components: WidgetA where I set a filter ```...

Navigation Item use isActiveWhen()

i tried to use custom navigation item in my panel ```php NavigationItem::make('ActivityResource-Index') ->url(fn (): string => ActivityResource::getUrl('index'))...
Solution:
Fixed: I use php artisan route:list to see correct view ```php ->isActiveWhen(fn () => request()->routeIs('filament.employee.resources.activities.index'))...

Action with Notification not showing

Dealing with a small issue where notification isn't appearing. I have a header action that launches a job. When I confirm the action, it returns to the index and nothing happens. No indication that it was successfully started. Any ideas? ```php Action::make('sync_bigcommerce_products') ->label('Sync with BigCommerce')...