feat: assign student role during record creation in CreateStudent page
This commit is contained in:
parent
c59fb6e5bf
commit
8ade943bd9
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Resources\Master\Students\Pages;
|
namespace App\Filament\Resources\Master\Students\Pages;
|
||||||
|
|
||||||
|
use App\Enums\RoleEnum;
|
||||||
use App\Filament\Actions\BackAction;
|
use App\Filament\Actions\BackAction;
|
||||||
use App\Filament\Resources\Master\Students\StudentResource;
|
use App\Filament\Resources\Master\Students\StudentResource;
|
||||||
use App\Filament\Support\SystemNotification;
|
use App\Filament\Support\SystemNotification;
|
||||||
@ -55,6 +56,8 @@ public function handleRecordCreation(array $data): Model
|
|||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$user->assignRole(RoleEnum::Student->value);
|
||||||
|
|
||||||
return $student;
|
return $student;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user