Darpan
How to use nested relationship in SelectFilter?
I have State, City and Suburb models.
Suburb belongs to City, City belongs to State.
In table
TextColumn::make('city.state.name')
is working fine.
But in table select filter I am getting following error.
SelectFilter::make('state')->relationship('city.state', 'name')
Call to undefined method App\Models\Suburb::city.state()
7 replies
Panel domain - CORS Issue - Spatie Media Library File Upload
When I use
$panel->domain('admin.example.test')
I get following error
Access to fetch at 'https://example.test/storage/1/mWYF1pIRZoK9jwFPajd7FCdDN2kdua-metaYXV0aG9yLWJhbm5lci5qcGc=-.jpg' from origin 'https://admin.example.test' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
but it works when I remove ->domain()
and use ->path()
.
How can I make it work?11 replies
User menu items, route not found
I added user menu item as per the docs (https://filamentphp.com/docs/3.x/panels/navigation#customizing-the-user-menu), but getting route not found error.
When I run
php artisan route:list
, I can see that the route is registered.
5 replies
Search field losing focus
When I type something in the search box of the table, it loses focus after showing the search results. For example, let's say I want to search for "mango." When I type "man" and wait for a second, it fetches results containing "man," but the search box loses focus, and I can't finish typing the word. Is this supposed to happen?
I also have another project in filament v2 in production, and when I checked this behaviour there, the search box didn't lose focus.
5 replies
Select component resets after save or state update
I have a simple form on custom page with select component but when I click on save button the it resets the select component (blank with no styling) and I get an error in console:
Uncaught (in promise) TypeError: Expected one of the following types text|select-one|select-multiple
Test.php
test.blade.php
4 replies
Custom brand logo not showing on live server and Translation also not working?
I followed this, https://filamentphp.com/docs/2.x/admin/appearance#changing-the-brand-logo, its working on local machine, but not working on live server, it fallback to text version.
3 replies
Livewire.js 404 when app is hosted in sub directory
My application is in "app" sub directory https://example.com/app, filament admin is showing login page but livewire.js is not found. Console shows https://example.com/livewire/livewire.js not found. How can I make it work?
All other assets like filament.css, app.css, app.js loading without any issues.
11 replies
Remember section collapse position
Is it possible to remember if section(https://filamentphp.com/docs/2.x/forms/layout#section) is collapsed or open after reload?
2 replies
ToggleColumn Action
I have a ToggleColumn on my table that updates the pinned status of news posts. However, I want to limit the number of pinned posts to three, so I have disabled the toggle when the post count is equal to or greater than three.
To ensure that the toggle behaves as intended, I am using the ->action() function. However, it does not seem to be working correctly. I need to investigate this further.
Another issue I have noticed is that when I update the toggle status of a post, the other records in the table do not update (i.e., disable) automatically. Instead, I need to manually refresh the page. I would like to understand why this is happening and find a solution to make the updates happen automatically.
6 replies