Files
panel-pelican-dev/app/Filament/Resources/ServerResource.php

38 lines
862 B
PHP
Raw Normal View History

2024-03-24 01:48:03 -04:00
<?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;
public static function getNavigationBadge(): ?string
{
2024-05-15 16:48:32 +02:00
return static::getModel()::count();
}
2024-03-30 20:31:36 -04:00
protected static ?string $navigationIcon = 'tabler-brand-docker';
2024-03-24 01:48:03 -04:00
protected static ?string $recordTitleAttribute = 'name';
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'),
];
}
}