$arguments * @param array $context */ public function mountAction(string $name, array $arguments = [], array $context = []): mixed { if (($context['table'] ?? false) === true && filled($context['recordKey'] ?? null) && in_array($name, ['archive', 'restore', 'forceDelete'], true)) { try { BackupScheduleResource::resolveScopedRecordOrFail($context['recordKey']); } catch (ModelNotFoundException) { abort(404); } } return parent::mountAction($name, $arguments, $context); } public function mount(): void { $this->syncCanonicalAdminTenantFilterState(); parent::mount(); } protected function getHeaderActions(): array { return [ BackupScheduleResource::makeCreateAction() ->visible(fn (): bool => $this->tableHasRecords()), ]; } protected function getTableEmptyStateActions(): array { return [ BackupScheduleResource::makeCreateAction(), ]; } private function tableHasRecords(): bool { return $this->getTableRecords()->count() > 0; } private function syncCanonicalAdminTenantFilterState(): void { app(CanonicalAdminTenantFilterState::class)->sync( $this->getTableFiltersSessionKey(), tenantSensitiveFilters: [], request: request(), tenantFilterName: null, ); } }