Filament

F

Filament

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

Join

Filtering select options on-fly

I've been working on a feature where I have a select field and based on the first selection I chose, I want the form to dynamically filter out options I have. Current concept works on filtering by first selection entity dimensions, for example, if I make a choice of 600x400, I want options to re-render with options that have the same size of 600x400. I've tried to set Select form input as live()/reactive(), added a relationships' modifyQueryUsing closure to do the filtering which yields a correct query after dumping it and I have tried to set it in ->options(... by using closure. But nothing really seems to work as options are not updating. ...
Solution:
Ok, I found that Select isn't the best option here. If I make this for CheckboxList instead, it can properly re-render available options as my intention was. Don't think that Select is really capable of that without re-opening it.

Nested modal

I'm new in Filament and try to create nested modal example but I didn't know how to apply the action. In the following example, I try to open a form in modal if the user chooses (with review) option. You support is highly appreciate....
No description

Native DateTimePicker

I would like to format the native date time picker displayed value. But the same formatter as on the non native date time picker not working. Can anyone faced this before?

How to sort the order of resources in the global search result?

Hello everyone. How to sort the order of resources in the global search result? By default, the order of resources is alphabetical. I want to set my own order of resources, because the first positions contain little-used resources that are distracting....

How to use a custom policy for a custom resource page or disable authorization entirely?

Is it possible to use a custom policy for a custom resource page? Lets say I have a page to download files from an existing resource. I want to use a custom policy download for this resource. How can I manage access to the page? It seems like the model policies take precedence over the canAccess()-method of the page. So the "normal" model policies deny access to the custom resource download page, because I can't define the download policy for this resource page.
Solution:
Why is this even a Resource when you only have one custom page? Just create a single page

Create resource not found

Hello everyone, I have a small problem with one of my resources (CustomerResource). Originally, I had removed the creation page to keep only the modal because the form was quite simple. It got more complex later, but I can't find the creation page. Every time I get a 404... - I do have a page resources/CustomerResource/CreateCustomer.php - The page is correctly listed in getPages()...
Solution:
You put the create route below the view route so it tries to look for a record with the slug create.
No description

Allowed memory size of 134217728 bytes exhausted (tried to allocate 31817560 byte

How can I fix this error? Im using a forked version of filament because I working on a PR. (Since v4 doesnt build yet im testing it on v3) Everything was working fine until suddenly I got this message. I was playing around with table.js. When this happened I reverted back to HEAD and I still get this error. I cleared laravel cache, views and I even restarted and I still get the error. Does anyone have an Idea?...
Solution:
Fixed it my changing the memory limit in the php.ini

testing table action

Maybe I am being dumb but hopefully someone can help. I have a simple Resource that has a table and it also has a custom page. The custom page is listed in the getPages() function on the resource ...

`replaceMountedAction()` seems not to be available in the `modalCancelAction` is that correct?

I tried using the replaceMountedAction() method in the modalCancelAction action but it doesn't do anything. Is it correct that it can't be used there? Or is there any workaround? I want to have two buttons in a modal that go to another action modal.

How to setup active and inactive under user

Hi Channel, How can I set up active and inactive status for a user? I want to create a user with active and in-active. because only active users can log in, and if the user is inactive, it should display a "contact admin" message. How can I achieve this in Filament? Any help would be appreciated....

Undefined variable $unreadNotificationsCount

I'm implementing database notification into a Laravel project (not in the Panel), the side modal woks, but i cannot acces the $unreadNotificationsCount variable to show the number of notifications unread. I've already added to the AppServiceProvider the trigger DatabaseNotifications::trigger('partials.notifications-button'); Any suggestions? This is the button code:...

Import action Filepond initialization issue

I'm using Import action which opens a modal. Modal has a form to upload a file using Filepond plugin. For some reason the Filepond plugin does not initialize always. Seems like if I navigate to tab which does not have table rows, the Filepond initializes correctly, but if table has rows it fails. Also, seems like the upload does not work without Filepond. If you try to upload a file with native file picked, it gives validation error: The file field is required....

Table TextInputColumn Update Other Model

hi guys seek help, Is it possible to update data from another model? For example, in this code: php Copy code class ScorecardTableWidget extends BaseWidget...

Show file uploaded in Infolist

Hi. My forms uploads a PDF to the storage. Is there a way to show a component in an Infolist and download the file? Thanks...
Solution:
Oops, I managed to solve it using Custom entries. https://filamentphp.com/docs/3.x/infolists/entries/custom My view:...

How can I create a custom dashboard?

I want to make a personalized dashboard with another graphics library and with another type of design, cards and tables with other customizations, how should this be done to call a totally different design? I want as an idea to make something more less similar to what is shown in the images....
No description

How to disable create button on Wizard's last step using Alpine?

Hello, I have a 2 step wizard which I am using to add card details for Stripe. Step one takes the card details and goes to step two to submit the form. But before submitting the form I need to disable the create button and as soon as the Step two loads I need to send the Step one data (card details) to Stripe JS to receive the token that I want to set as value for Step two's hidden field named card_token. Once the card_token field is filled I need to enable the Create button to submit the form....

Generic admin panel (not related to table/model)

How does one create an admin 'utility' page/panel/widget/whatever that is not related to an existing model/table or the database? (all the help pages I can find seem to relate to dealing with laravel models) I have a tool I use in conjunction with a management back end that generates an svg file from text. I'd like to wrap it in with the other admin tools for that package/plugin. I'd like to use the filament form builder tools if possible to do it. (I already have functions ready to generate the select options/values I need for a form)...
Solution:
did you try adding this trait use InteractsWithForms;

I would like to create a feedback form connected to a user id throught the shared table.

I would like to create a feedback form connected to a user id throught the shared table. I would like to you the panel builder and display it on the sidebar/panel. Please assist me on how I can go about. Thank you

BulkAction options based on selected records.

Hey guys! I have a table with the option for bulk actions, when i select for example 3 entries on the action i want to be able to get the ids of the selected records. ...

Input Masking not rendering in Edit Mode

Look how I click the edit button then the phone is in normal mode, but when I click it , the phone format appears https://gyazo.com/9dbe855f09fa26c413aaeb7b96cbf368...