mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 20:14:46 +02:00

* enable tags for nodes * update icon for cpu column * disable inline for "force outgoing ip" label * change label for database hosts resource * add custom empty state for database hosts & api keys * add icons to egg tabs * fix typo * rename node "Automatic Allocation" to avoid confusion * run code cleanup * remove regex for node name * only check count for application api keys * replace "New" with "Create" * change sidebar width to fit "Database Hosts"
38 lines
922 B
PHP
38 lines
922 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources;
|
|
|
|
use App\Filament\Resources\EggResource\Pages;
|
|
use App\Models\Egg;
|
|
use Filament\Resources\Resource;
|
|
|
|
class EggResource extends Resource
|
|
{
|
|
protected static ?string $model = Egg::class;
|
|
|
|
protected static ?string $navigationIcon = 'tabler-eggs';
|
|
|
|
protected static ?string $recordTitleAttribute = 'name';
|
|
|
|
protected static ?string $recordRouteKeyName = 'id';
|
|
|
|
public static function getNavigationBadge(): ?string
|
|
{
|
|
return static::getModel()::count() ?: null;
|
|
}
|
|
|
|
public static function getGloballySearchableAttributes(): array
|
|
{
|
|
return ['name', 'tags', 'uuid', 'id'];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => Pages\ListEggs::route('/'),
|
|
'create' => Pages\CreateEgg::route('/create'),
|
|
'edit' => Pages\EditEgg::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|