Matheeus
"The model [App\Models\Team] does not have a relationship named [leads]." (Multi-tenant + Modules)
I'm writing a Multi-tentant app with Filament V3, but this app uses the Modules structure (using nWidart/laravel-modules and savannabits/filament-modules libraries)
The problem is that Multi tenancy requires that the "Team" (so the tenant model) contains a relationship function to each of my Models, but in my case I can have "dynamic" models that can change by the Modules i'm using, so it's impossible to know and implement all the relationship methods in Teams (also this model potentially can get too long and a mess if the app gets more complex).
Is there anyway to workaround this or disable this requirement?
3 replies
How to force re-render/refresh of an Input?
It’s possibile in the Edit form of a Resource to re-render a specific input field when I click the save button?
In particular I want to force the refresh/reload of the PdfViewerField from https://filamentphp.com/plugins/joaopaulolndev-pdf-viewer
6 replies
Disable select by evaluating if another input value is null or not
I'm trying, on Filament V2, to disable/enable select by evaluating another input if it's nulled or not, but seems like when I populate the company_id select, the second doesn't enable.
Where i'm wrong?
Select::make('company_id')
->relationship('company', 'legal_name')
->searchable(['legal_name', 'vat_number'])
->preload()
->label('Azienda destinataria'),
Select::make('company_contact_id')
->relationship('company_contact', 'full_name', fn (Builder $query, $get) => $query->where('company_id', $get('company_id')))
->searchable(['name', 'surname', 'email'])
->preload()
->label('Referente aziendale')
->disabled(fn ($get) => $get('company_id') == null)
->required()]),
3 replies
Tailwind dark:hidden doesn't work
Hi,
i'm trying to have two versions of the logo by using the dark:hidden class on Filament v3, but it doesn't work.
Here's the code:
<img src="{{ asset('/images/logo.svg') }}" alt="Logo" class="block dark:hidden h-9">
<img src="{{ asset('/images/logodark.svg') }}" alt="Logo" class="hidden dark:block h-9">
Any hint?
9 replies