| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App\Filament\Resources\StudentResource\Pages;
- use App\Filament\Resources\StudentResource;
- use Filament\Resources\Pages\CreateRecord;
- class CreateStudent extends CreateRecord
- {
- protected static string $resource = StudentResource::class;
- protected function getRedirectUrl(): string
- {
- return $this->getResource()::getUrl('index');
- }
- protected function getCreatedNotificationTitle(): ?string
- {
- return '学生创建成功';
- }
- protected function getCreatedNotification(): ?\Filament\Notifications\Notification
- {
- return \Filament\Notifications\Notification::make()
- ->success()
- ->title('学生创建成功')
- ->body('学生信息已成功保存。');
- }
- }
|