mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 14:46:53 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			39 lines
		
	
	
		
			940 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			940 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Filament\Resources;
 | |
| 
 | |
| use App\Filament\Resources\DatabaseResource\Pages;
 | |
| use App\Models\Database;
 | |
| use Filament\Resources\Resource;
 | |
| 
 | |
| class DatabaseResource extends Resource
 | |
| {
 | |
|     protected static ?string $model = Database::class;
 | |
| 
 | |
|     protected static ?string $navigationIcon = 'tabler-database';
 | |
| 
 | |
|     protected static bool $shouldRegisterNavigation = false;
 | |
|     protected static ?string $navigationGroup = 'Advanced';
 | |
| 
 | |
|     public static function getNavigationBadge(): ?string
 | |
|     {
 | |
|         return static::getModel()::count() ?: null;
 | |
|     }
 | |
| 
 | |
|     public static function getRelations(): array
 | |
|     {
 | |
|         return [
 | |
|             //
 | |
|         ];
 | |
|     }
 | |
| 
 | |
|     public static function getPages(): array
 | |
|     {
 | |
|         return [
 | |
|             'index' => Pages\ListDatabases::route('/'),
 | |
|             'create' => Pages\CreateDatabase::route('/create'),
 | |
|             'edit' => Pages\EditDatabase::route('/{record}/edit'),
 | |
|         ];
 | |
|     }
 | |
| }
 | 
