Filament

F

Filament

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

Join

ERR_TOO_MANY_REDIRECTS

After installing wsl and docker, I copied a project from github, installed the database and everything works perfectly. But I always get the error ERR_TOO_MANY_REDIRECTS. Any idea what could be happening? I have already deleted the cookies, etc.

Spatie Media Library not show images correctly in grid

When using the Spatie Media Library component it sometimes loads correctly and other times it loads incorrectly. I don't understand why since there is no error in the console. I think it only happens when the layout is grid because I have another component of an image that always looks good. ```php...
No description

How to Display a "New User" Option When Searching for Users in Filament?

I am using Filament's Select component with the searchable() feature to allow searching for users with specific roles. I want to implement the following behavior: 1. Always show a "New User" option at the bottom of the list when searching for users. 2. If the user being searched for is not found, the "New User" option should still appear. How can I achieve this while maintaining the searchable() functionality of Filament's Select component?...

Hi guys

I would like to know how I could modify the code above to place the images side by side instead of one on top of the other, as shown in the image. Notes: This is in an infolist. The field is a json with imageLinks as www.imageexample.com...
No description

Tailwind css not working on full-page livewire component

Hi, hope you all are doing well. I'm trying to render livewire component as full-page via: Route::get('path', LivewireComponent::class) Tailwind css not working on it. ...
Solution:
you can do this if you don't want to use TALL preset.. php artisan livewire:layout ```bash...

Test tenancy redirects

Got a wierd one here. If I go to my filament app, login, then in the browser just enter https://domain.com/admin (the default panel is 'admin'), I get successfully redirected to <default tenant>.domain.com/admin All good....

Table Modal Action disappears

I have a custom table action, that shows a modal with an audio control, I am using the modelContent method to set a custom view, the view code is this one ```php <div x-ignore ax-load ax-load-src="{{ \Filament\Support\Facades\FilamentAsset::getAlpineComponentSrc('sip-client') }}" x-data="sipClient({ state: {...

Bulk Action showing a view

Hello everyone. Is it possible to make a BulkAction show a view page without using a modal? I need to show a view blade with the list of records marked in the table builder. I was able to do it using the modal, but it doesn't work; it has to be displayed on a page just like the ViewPage. Thanks.

state/reactive filters question

As in some apps(my case), I would need that filters interact with each other to change the query results of the select filter. So the only way of achieving this result would be thru custom filters, and seeing that they have access to the form fields they would have access to state... That would be the recommended way or is there a better way to achieve reactive filters? Example: after the user changed the city in the filter it would change the neighborhood options...

Filament admin panel with Breeze API

I have an app that was built using the Breeze starter kit with the API only option. My laravel backend is just an API for a next.js front end. https://laravel.com/docs/11.x/starter-kits#breeze-and-next I would like to add filament to my app as an admin panel for the back end however I am getting conflicts between the authentication setup by the breeze starter kit and the filament login. What I the best way to resolve this?...

Performance issue with BulkAction : selectedRecords (only IDs, not Eloquent?)

Hi guys, I'm working on a Filament app and I need to add some exports features. We have a lot of tables and data, so both the official Filament Export action and Dennis Koch package are not suitable for us. I'm using Laravel Excel and DB Query without Eloquent, but I wish I could offer my users a way to filter the data before export them. For that, I'm trying to use BulkAction, however the $selectedRecords is an Eloquent collection and when using the Select All it makes my app crashes. Is that a way for the table select option to only retrieve an array of ID and not load the entire Eloquent collection? I know this is a very specific request and maybe it's not possible, but I just want to be sure before switching to a custom solution....

Align heading with search bar

Is it possible to align transactions heading on the same line as the search bar without publishing and editing vendor files
No description

Change Focus Programmatically

is there a simple way that at the end of an action I can put the focus on a specific text box? using the default pages (create and edit) and not having to define a custom one and have AlpineJs intervene? I tried to use autofocus and other tricks https://cornel.co/article/focus-input-alpinejs#:~:text=To%20focus%20an%20input%20element,the%20standalone%20x%2Dinit%20directive.&text=However%2C%20if%20your%20input%20element,to%20use%20Alpine's%20%24nextTick%20function. ...
No description

`goToWizardStep` is not working in test

Hi i am trying to validate some data in each step of my form wizard but i seem like i can not start the form on the 2nd step as per doc when i use the go to Wizard step i can error saying it still on the first step Ps i dont have skipable steps ```php...

use another login for my second panel

i have a panel in my project with guard "admin" i have also another panel with guard "seller" but it must login with phone number. I wanted to know how I can have a login page with phone number based login?...

Unterminated string

I need some help with this one, I have a table widget that has a basic query: For some reason, when I paginate either Prev or Next the button it starts spinning and won't stop until I refresh the page, I'm getting the following Javascript error in the browser: ...
No description

how to disable a resource?

I need to not display or disable a resource without having to remove it for later use.

Is Filament PHP8.4 compatible?

I can't find any announcement related to this, and I note that 8.4 is not part of the tests in the Github repo. Is there an official position on whether it's compatible?...
Solution:
Update. I can get the test suite to pass in 8.4, but only if I bump rector, phpstan and larastan up to the next major versions. Otherwise I get fatal errors. I suspect this may well be caused by the analysis of the code and not the code itself, however that is a hunch not a fact. The fact is I saw the tests fail with 8.4 with the 3.x branch, so conclusion has to be that this project is not compatible with php8.4 yet. I'd love somebody to show me I'm wrong....

Real-time Input Updates in Edit Page with Relation Manager

I would like to update a readonly input on the edit page as I change the data in a Relation Manager. In my case, it's with numbers: I have two models, CashRegister and Transaction. In CashRegister, there's a field called closing_balance, and I want it to update in real-time as I add transactions through the Relation Manager on the edit page of the CashRegister resource. Could the same be achieved through a widget on the edit page or perhaps a card? Another example would be based on this screenshot from the Filament demo. Is it possible to sum the values of each product and display that on the same screen?...
No description
Next