Guys iam working with a project School Management System
i processed my login authentication work with spatie-larevel-permission package.
everything is fine but iam getting an error when moving to add a student after login
ReflectionException (-1)
Class clearance does not exist
i have added this line in my StudentController
public function __construct() {
$this->middleware(['auth', 'clearance']); //isAdmin middleware lets only users with a //specific permission permission to access these resources
}
even i changed the line like below also
public function __construct() {
$this->middleware(['auth', 'isAdmin']); //isAdmin middleware lets only users with a //specific permission permission to access these resources
}
whats the problem, after login it moves to home page, but when i click the nav bar add student it shows such an error. i dont know which line to add, when i referred in net they used with except('index','show'). but i no need that, everthing should be authenticated, as this was an application
i have users table, role table, role->permission table, user->role table.
and in my user model i added this line use HasRoles;
i used php php artisan make:auth