| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Filament\Resources\StudentResource\Pages;
- use Illuminate\Database\Eloquent\Builder;
- use App\Filament\Resources\StudentResource;
- use Filament\Actions;
- use Filament\Resources\Pages\EditRecord;
- class EditStudent extends EditRecord
- {
- protected static string $resource = StudentResource::class;
- protected string $view = 'filament.resources.student-resource.pages.edit-student';
- public function getTitle(): string
- {
- return '编辑学生';
- }
- protected function getHeaderActions(): array
- {
- return [];
- }
- protected function getRedirectUrl(): string
- {
- return $this->getResource()::getUrl('view', ['record' => $this->record]);
- }
- protected function getSavedNotification(): ?\Filament\Notifications\Notification
- {
- return \Filament\Notifications\Notification::make()
- ->success()
- ->title('保存成功')
- ->body('学生信息已更新。');
- }
- }
|