name; } public static function infolist(Schema $schema): Schema { return ApplicationInfolist::configure($schema); } public static function table(Table $table): Table { return ApplicationsTable::configure($table); } /** * @return Builder */ public static function getEloquentQuery(): Builder { // `subject()` reads the call on every row, and the handler shows in an // optional column: both are loaded up front rather than per row. return parent::getEloquentQuery()->with(['call', 'handler']); } public static function getPages(): array { return [ 'index' => ListApplications::route('/'), 'view' => ViewApplication::route('/{record}'), ]; } /** * Submissions arrive from the public site. Nobody types one in. */ public static function canCreate(): bool { return false; } /** * The number of people waiting for an answer — the only figure in this * panel that represents somebody else's time rather than ours. */ public static function getNavigationBadge(): ?string { $pending = static::getModel()::query()->pending()->count(); return $pending > 0 ? (string) $pending : null; } public static function getNavigationBadgeColor(): ?string { return 'warning'; } public static function getNavigationBadgeTooltip(): ?string { return __('panel.applications.badge_tooltip'); } }