JG
JG
FFilament
Created by JG on 10/24/2024 in #❓┊help
Show both an infolist and a form on a RelationManager modal
5 replies
FFilament
Created by JG on 10/24/2024 in #❓┊help
Show both an infolist and a form on a RelationManager modal
Hoped I could override this
protected function configureEditAction(Tables\Actions\EditAction $action): void
{
$action
->authorize(static fn (RelationManager $livewire, Model $record): bool => (! $livewire->isReadOnly()) && $livewire->canEdit($record))
->form(fn (Form $form): Form => $this->form($form->columns(2)));
}
protected function configureEditAction(Tables\Actions\EditAction $action): void
{
$action
->authorize(static fn (RelationManager $livewire, Model $record): bool => (! $livewire->isReadOnly()) && $livewire->canEdit($record))
->form(fn (Form $form): Form => $this->form($form->columns(2)));
}
with this
protected function configureEditAction(Tables\Actions\EditAction $action): void
{
$action
->authorize(static fn (RelationManager $livewire, Model $record): bool => (! $livewire->isReadOnly()) && $livewire->canEdit($record))
->infolist(fn (Infolist $infolist): Infolist => $this->infolist($infolist->columns(2)))
->form(fn (Form $form): Form => $this->form($form->columns(2)));
}
protected function configureEditAction(Tables\Actions\EditAction $action): void
{
$action
->authorize(static fn (RelationManager $livewire, Model $record): bool => (! $livewire->isReadOnly()) && $livewire->canEdit($record))
->infolist(fn (Infolist $infolist): Infolist => $this->infolist($infolist->columns(2)))
->form(fn (Form $form): Form => $this->form($form->columns(2)));
}
but no success
5 replies
FFilament
Created by JG on 7/22/2024 in #❓┊help
Filament::getTenant() is null on AJAX calls
fixed it by adding IdentifyTenant::class, SyncSpatiePermissionsWithFilament::class, to the end of the ->middleware() method of the panel
6 replies
FFilament
Created by JG on 7/22/2024 in #❓┊help
Filament::getTenant() is null on AJAX calls
For web request routes it does this so it makes sure the tenant is set before: public function getTenantMiddleware(): array { return [ IdentifyTenant::class, ...$this->tenantMiddleware, ]; }
6 replies
FFilament
Created by JG on 7/22/2024 in #❓┊help
Filament::getTenant() is null on AJAX calls
I can tell that it has something to do with the order in which the middlewares are executed. Looks like IdentifyTenant is executed after other tenant middlewares and this is why it fails.
6 replies