Filament

F

Filament

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

Join

issue with prod

suddenly get this error on production Uncaught ReferenceError: isRecordSelected is not defined. Any alpine code is not working.. Same code working on local and dev

how can I enable adding a relation resource in the view page of the main resource

I have a MaintenanceRequestResource that is linked to MaintenanceAttachmentRelationManage as an admin I can access both view and edit page of the MaintenanceRequestResource users only have access to view page ...

Call to a member function getRelated() on null

I am encountering an issue while using Filament and Eloquent in Laravel. Specifically, I am trying to display the district.name column from the Homestays table, but when there is a record in the homestays table with district_id=1000 and there is no corresponding record in the district table with id=1000, I get the following error: Call to a member function getRelated() on null Here’s the code I’m using: ...

Need solution for outdated PDF URL

Hi guys, I have QuoteResource. After saving EditQuote I run queue job to generate pdf version of quote. Then I have download action button on ViewQuote. Problem is that the button has url of old pdf, that is being regenerated, so I need to refresh page after about 1 second to get new url. Do you have any suggestion? I am using Spatie Media Library to store pdf and Spatie PDF to generate it (probably unimportant). ```php Action::make('download') ->label('Download quote')...

Excel Import Issue

Hi, I am trying to add additional fields to table header action beside just filupload. So goal is to add additional text input next to file upload....

auth()->user() returns null on dashboard canAccess method

I have multiple dashboards for different user roles. And i have to check user's role at the canAccess method of that dashboard. I am getting error. ```...
No description

Multiple images upload issue on mobile

What I did: I'm using Spatie Media File Upload to upload multiple images. My issue/the error: It works fine on PC, but when I use it on some phones and select about 14-20 images, each image ~2MB, the browser restarts itself. It works on some newer models (such as iPhone 15 Pro), but not on some older models such as iPhone 13, iPhone 11, etc. Code: ...

Tailwindcss theme problem

Good day, I have a component in Livewire that generates a calendar. The component uses tailwindcss. I would like to use this component in filament-page, but when I use it there, the calendar has no style. Adding css classes to the resources/css/app.css file and compiling this with npm run build does not help. The css code is not visible in the page preview.
Solution:
@vite(['resources/css/filament/dashboard/theme.css'])
@vite(['resources/css/filament/dashboard/theme.css'])
...

change direction (from column to row) of a section within a grid

hi all, im looking to implement a different alignment to a section inside my form. i am displaying images inside a grid and need to change the alignment. the default seems to be a column but i want to have a horizontal direction. ``` Grid::make(2) ->schema([...
No description

Advanced Search on Select Form Component by Opening A Modal

Hello! What is the best way to allow for more complex searching options when choosing a Select option? I added a button to a Select component so that a modal with a form opens, where they can choose more complex search queries when searching an option like using checkboxes, other Select components, on top of the usual keyword search (unlike just a single query string when using the Select's searchable setting), and then finally choosing an option from the search results, and that will be the Select component's state. I was able to add an action to the Select component's suffix, and I also made a custom Livewire component containing a Table, and tried to render it as custom modal content. However, I encountered a weird error where $this in the Livewire component's view file is an instance of the CreateResource page (specifically, CreateArticle for me) instead of what I expected to be an instance of my custom component (SearchGame)....

Localization not working for MenuItem in the PanelProvider

Hello, I noticed that the localization for the label of a MenuItem does not work when the language is changed, it remains on the default translation. Here's my ``` ->userMenuItems([...

Adding HTML id attribute to Nav Items, RelationManager Tabs, etc.

How can I add custom html attributes (especially id) to Filament components like Nav Item, RelationManager tab, etc. ? I know for Form Components there is https://filamentphp.com/docs/3.x/forms/layout/getting-started#adding-extra-html-attributes Thanks...

Error trying to download export as .xlsx

An export has recently started failing in production when I try to download as .xslx. It still works fine if I download as .csv. The same report also works fine locally. Stack trace is attached. I have checked the storage folder and I see the .xlsx file there, and I can download it through ftp just fine....

How to auto disable table grouping if there has any sorting column active?

because the table has a count column based on relation, if i sort by the count column, the group shows on each row

Modal Action with Wizard, add additional Footer Actions

I am using a the ->steps() method on an Action, to create a Wizard with a modal action: ```php use Filament\Forms; use Filament\Tables\Actions\Action; ...

Should we duplicate code to make wizard edit steps ?

I made a big steps form to create my resource but for the edit should I duplicate this code ? (I hope no) Thank you...

Defer the table row actions rendering?

Hi there! I built a Resource table with ~ 200 rows. Displaying this page takes about 7000ms. I first thought about an N+1 issue but not!...
No description

Middleware auth + custom in Filament Blade

can i ask something differnt? i have some page /building/id /my/transaction /my/booking ...

i want to change routes login in filament

by default the login page locate in /admin/login, i think this doesnt make sanse for role user to login, so i decide to replace the login routes from /admin/login to /admin, but it doesnt work for me, can u help me? in admin panel i already add ``` return $panel...
No description

Action form, validate data from API

Hello everyone. I use Action as forms, and I would like to check some condition via an API call first before the form submits and reset form. Essentially the form will try to submit, I make an API call to see if the form data is viable and throw a validation error if it isn't based on the API response. Normally, I would let the request submit and then fail if it doesn't pass the validation. But this is a very big form, and having to redo the whole thing might not be great for the user....