userable_type != Student::class; } /** * Determine whether the user can view the model. */ public function view(User $user, Grade $grade): bool { return $user->userable_type != Student::class; } /** * Determine whether the user can create models. */ public function create(User $user): bool { return $user->userable_type == Admin::class; } /** * Determine whether the user can update the model. */ public function update(User $user, Grade $grade): bool { return $user->userable_type == Admin::class; } /** * Determine whether the user can delete the model. */ public function delete(User $user, Grade $grade): bool { return $user->userable_type == Admin::class; } }