mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 17:26:53 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			38 lines
		
	
	
		
			870 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			870 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Filament\Resources;
 | |
| 
 | |
| use App\Filament\Resources\ServerResource\Pages;
 | |
| use App\Models\Server;
 | |
| use Filament\Resources\Resource;
 | |
| 
 | |
| class ServerResource extends Resource
 | |
| {
 | |
|     protected static ?string $model = Server::class;
 | |
| 
 | |
|     protected static ?string $navigationIcon = 'tabler-brand-docker';
 | |
| 
 | |
|     protected static ?string $recordTitleAttribute = 'name';
 | |
| 
 | |
|     public static function getNavigationBadge(): ?string
 | |
|     {
 | |
|         return static::getModel()::count() ?: null;
 | |
|     }
 | |
| 
 | |
|     public static function getRelations(): array
 | |
|     {
 | |
|         return [
 | |
|             //
 | |
|         ];
 | |
|     }
 | |
| 
 | |
|     public static function getPages(): array
 | |
|     {
 | |
|         return [
 | |
|             'index' => Pages\ListServers::route('/'),
 | |
|             'create' => Pages\CreateServer::route('/create'),
 | |
|             'edit' => Pages\EditServer::route('/{record}/edit'),
 | |
|         ];
 | |
|     }
 | |
| }
 | 
