getTranslation('title', app()->getLocale()); } /** * @return array */ public static function getGloballySearchableAttributes(): array { return ['title->'.app()->getLocale()]; } public static function form(Schema $schema): Schema { return ProjectForm::configure($schema); } public static function table(Table $table): Table { return ProjectsTable::configure($table); } public static function getRelations(): array { return [ ReviewsRelationManager::class, RevisionsRelationManager::class, GalleryRelationManager::class, RepositoriesRelationManager::class, ]; } public static function getPages(): array { return [ 'index' => ListProjects::route('/'), 'create' => CreateProject::route('/create'), 'edit' => EditProject::route('/{record}/edit'), ]; } public static function getRecordRouteBindingEloquentQuery(): Builder { return parent::getRecordRouteBindingEloquentQuery() ->withoutGlobalScopes([SoftDeletingScope::class]); } /** * Surfaces how many projects are asking for contributors — the number the * collective most wants to act on. */ public static function getNavigationBadge(): ?string { $count = static::getModel()::query()->needingHelp()->count(); return $count > 0 ? (string) $count : null; } public static function getNavigationBadgeColor(): ?string { return 'warning'; } }