Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

Page Active Classes

Hello, I have custom filament Page, that within consists on some classic cards that lead to other sub pages. So my question is: Is there any way to place "active" class on parent custom filament Page when I am on either one of those sub pages?...

Opening a modal on table row click with infos

Hi there 👋🏻 I am very sure that it's possible to open a small modal with information when clicking a table row instead of opening the view or edit page. I searched the documentation but can't find it anymore. Can someone help me out finding the correct term to search for? Thanks!!! 😄...
Solution:
Meanwhile I found the section in the docs 😄 https://filamentphp.com/docs/3.x/panels/resources/viewing-records#viewing-records-in-modals But is there a way to not show the form and instead an infolist in the modal?...

Tailwind color not applied

```php protected static function getDefaultCurrencyWarning(): Forms\Components\Placeholder { return Forms\Components\Placeholder::make('default_warning') ->hiddenLabel()...

404 Error when routing custom pages

Hello everyone, We have a member panel where we had to build many custom pages. For example, categories, category, posts, post and tags. The categories have the following route: /categories - This works without any problems....
Solution:
I solved it. The reason why it didn't work properly is the order in which you specify the pages in the provider.

Is it possible to change the Yes No Colours of Toggle Buttons?

Is it possible to change the Yes No Colours of Toggle Buttons? How? Thank you...

Edit parent attributes from the childResource page?

I have a PatientResource. Patient belongs to User. I want to be able to change User attributes from the PatientEdit page. How would I go about that?

Laravel still generates HTTP URLs when uploading images, even after forcing HTTPS in AppServiceProvi

I'm working on a Laravel project hosted on Railway. I've already configured AppServiceProvider to force HTTPS in production using URL::forceScheme('https'), and I’ve also set the base URL (app.url, asset_url, etc.) to use https. The site correctly loads all pages and assets over HTTPS. However, when uploading an image, Laravel still generates a public URL that starts with http:// instead of https://. The image itself uploads correctly and is displayed without issue, but the generated URL uses HTTP, which leads to mixed content warnings in the browser....

Alpine Expression Error: table is not defined

Hello, I have a ManageParties page, when I implement $defaultAction, or force an action in query param with ?action=create, the action doesn't open and I get errors in the browser console. Thank you for your help 🙏 ...
Solution:
FYI: I found my issue, it's related to the plugin Global Search Modal I can reproduce/fix the behaviour by add/removing the plugin in my panel provider...
No description

Calling modal from <a> tag

Is it possible to call a modal from an <a> tag? This is the snippet of my code ```php...

Heroicon Cache Issue

Hello - I went to add an icon to an action and added ->icon('heroicons-o-download'). But I made two errors: 1. It should be heroicon not heroicons 2. download doesn't actually exist (I was guessing) And now, my app is broken. I get the error message Svg by name "o-download" from set "heroicons" not found....
Solution:
OK this is really strange. Following the stack trace I went and commented out lines 166-171 of vendor/filament/support/resources/views/components/link.blade.php And now it's working again. Even after I un-comment those lines......

Authorization - 404 instead of 403.

When trying to access a page for which I don't have access I get 404 instead of 403. Why is that so?...
Solution:
Ah.. here we go. I got this bit of code on my resource. ```php public static function getEloquentQuery(): Builder { return parent::getEloquentQuery()->where('user_id', auth()->id());...

How to refresh a field in the parent form when a record is added via the RelationshipManager?

So, on the CreateAction in the RelationshipManager, I'd like to ensure that a field in the parent form/infolist view gets refreshed from the DB I've seen a couple of posts talking about dispatching an event in the after method, but so far, from what I've seen on those suggestions, it essentially equates to reloading the page. I was wondering if there's a more targeted way to accomplish this, maybe diving down further into the Livewire aspects of the page as a whole?...

How do I properly add save button to form?

```php public function form(Form $form): Form { return $form...

Multiple filament (?) components in a single page

Hello, I'm looking for some design advice. I would like to have a creation form, which would turn into an editing form on submit, would spawn a relation manager after running a job to generate the related models, and could open an infolist to show the details of a row, all on the same page. Do you think Filament is equipped to deal with that kind of request, which does stray a fair bit from "admin panel", or otherwise what kind of tool am I looking for to make that kind of front-end?...
Solution:
I have since worked on other parts of the app while refining the model and went with a classic resource-page based design, I tackled making a custom page again and was eventually able to fit form, table and infolist in a single page by implementing the relevant interfaces (HasForms, HasTable, HasInfolists) and using the relevant traits (InteractswithForms, InteractswithTables and InteractswithInfolists). The biggest thing that eventually made it click for me is that I didn't need to edit the record after creation at all, so just having a form create the record and customizing the creation process so that the created record is stored to a property on the Page and sent to the Table to get the related records was enough. Using the @if directive to conditionally show the selected record on the table fixed the Infolist throwing an error about a record not being set that was stumping me. Filament really is a wonderful framework and I hope to learn even more about it to make even more functional components and better apps....

View Infolist - Action Button Beside Cancel Button

How can I add an action button next to the cancel button in the Infolist view?

FileUpload refreshed once it hit 100% on modal, addMedia not respecting it model_type

Hi I am having an issue where the FileUpload which is on modal slideOver Form refreshing on first time once the upload hit 100%. After it refresh, I was able to choose the file again and upload went on without refreshing on second try. Another issue is I am attaching the media to Application model through Offer model relationship but on submit, it giving me Call to undefined method App\Models\Offer::getMedia() error. Querying the Application::where('id', 'record->application_id') also give the same error. Putting HasMedia and InteractsWithMedia on Offer modal works but the model_type was entered as Offer instead of Application inside the database....
No description

Model Policy is loading in filament resource and breaking

Filament is loading my ClientPolicy when going to my Client Resource and its not passing the Client model as a second parameter. I do not understand why its loading the ClientPolicy in the first place? I'm not even going to the Create resource route but that is where the error is....

withoutGlobalScope() with Column Relationships

Let's a say I have a table column that uses a relationship, like this example from the docs: https://filamentphp.com/docs/3.x/tables/columns/relationships#displaying-data-from-relationships TextColumn::make('author.name') ...

Is it possible to pass data to View::make() ?

I have a page that I can render but I need to pass data to be able to dynamically render some fields

Request Problem crud operation

When I try to do crud operations, the following happens: it is sent and gets stuck. Then when I start again, the action has already occurred, for example, delete, update, write. How do I fix this? Nothing like this has happened before. It only happened after installing the filament.
No description