Vincent
Removing tenant parameter and middleware for SimplePage
Hi!
In the app I'm building, users can belong to multiple tenants.
I'm tracking their current organization via a
currentOrganization
relationship on the User model.
If a user's current org is empty, I'd like to redirect them to a page, /current-organization
, where they can select which of their organizations they'd like to administer. I'm doing this via middleware:
and /current-organization
:
This page is registered via the pages
method in the Panel Provider.
There are two problems:
1. The route above still appears in the {tenant}
namespace.
php artisan routes:list | grep current
shows: GET|HEAD myurl.test/{tenant}/current-organization ... filament.admin.pages.current-organization › App\Filament\Pages\CurrentOrganization
2. It gets stuck in a redirect loop despite explicitly disabling the offending middleware.
Is this a bug, or am I missing something? How can I remove it from the tenant routes? And how can I disable the middleware?4 replies
Is there a good way to compose fields together in a Custom Field?
Here's what I'm trying to do:
A custom field comprised of a Text Input and a Radio Input.
You type a search into the text input, an API is called on the backend, and the results of the API call populate the Radio.
I'd like those two inputs to be wrapped up inside a Custom Field so that I can use the default Text and Radio input style and functionality, but also add some simple custom HTML in the Blade component.
Does this approach make sense, or would it be better to just copy/paste from default Filament components?
Below is the (broken) code as it stands. The
afterStateUpdated
callback is never called, but I don't quite understand why -- I think the container
call is changing the scope of the TextInput
? But without setting container
, I get an exception.16 replies
TextColumn placeholder empty
Hi!
I've got an app I just upgraded from v2 to v3. I've got most of the kinks worked out, but one small thing is bugging me:
->placeholder
seems to not do much. Here's the column:
The cost_usd
attribute is a nullable float (😬). formatStateUsing
here works fine, and the column in the resulting table looks correct...except if the value is null
. placeholder
doesn't seem to make a difference.
The table is in a custom widget and otherwise works great.
Am I missing something?15 replies