| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace App\Filament\Resources\TeacherResource\Pages;
- use Illuminate\Database\Eloquent\Builder;
- use App\Filament\Resources\TeacherResource;
- use Filament\Actions;
- use Filament\Resources\Pages\ListRecords;
- class ListTeachers extends ListRecords
- {
- protected static string $resource = TeacherResource::class;
- protected function getHeaderActions(): array
- {
- return [
- Actions\CreateAction::make()
- ->label('创建老师')
- ->icon('heroicon-o-plus')
- ->size('lg')
- ->color('primary'),
- ];
- }
- public function getTitle(): string
- {
- return '教师管理';
- }
- public function getBreadcrumbs(): array
- {
- return [
- static::getResource()::getUrl('index') => '教师管理',
- ];
- }
- protected function getHeaderWidgets(): array
- {
- return [];
- }
- public function getHeading(): string
- {
- return '教师管理';
- }
- public function getSubheading(): string
- {
- $count = \App\Models\Teacher::count();
- return "共 {$count} 位教师";
- }
- }
|