mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 23:24:46 +02:00

* Init * Health Page * Admin API Keys * Update API Keys * Database Hosts * Mounts * remove `s` * Users * Webhooks * Server never again... * Fix Server * Settings * Update Mounts * Update Databasehost * Update Server * Oops, Update Server * Nodes * Update User * Dashboard * Update Server * Profile * Egg * Role & Update Egg * Add base Laravel lang files * update apikey * remove html back to settings, remove comment * add `:resource` to create_action * Update Egg * Update Egg v2 * Update 1 * trans cf info label * Update charts * more trans * Update Webhook * update Health * Update Server * Update Role * Fixes * Bulk Update * AnotherOne * Fix relation button label * rename `admin1` to `admin` Leftover from testing... oops * More Translations * Updates * `pint` + Relation Manager Titles
56 lines
1.3 KiB
PHP
56 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Admin\Resources;
|
|
|
|
use App\Filament\Admin\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';
|
|
|
|
public static function getNavigationBadge(): ?string
|
|
{
|
|
return static::getModel()::count() ?: null;
|
|
}
|
|
|
|
public static function getNavigationGroup(): ?string
|
|
{
|
|
return trans('admin/dashboard.server');
|
|
}
|
|
|
|
public static function getNavigationLabel(): string
|
|
{
|
|
return trans('admin/egg.nav_title');
|
|
}
|
|
|
|
public static function getModelLabel(): string
|
|
{
|
|
return trans('admin/egg.model_label');
|
|
}
|
|
|
|
public static function getPluralModelLabel(): string
|
|
{
|
|
return trans('admin/egg.model_label_plural');
|
|
}
|
|
|
|
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'),
|
|
];
|
|
}
|
|
}
|