[Solved] Syntax error: unexpected ;


You are missing if in } else ($role_type === 'User') { line it should be } else if($role_type === 'User') {

if (Hash::check($password, $hashedPassword->password)) {
    $role_type = DB::select('select role_type from users where 
            email = ?', [$email]);
    if ($role_type === 'Administrator') {
        $request->session()->put('success');
        return redirect()->route('admin');
    } else if ($role_type == - 'Staff') {
        $request->session()->put('success');
        return redirect()->route('staff');
    } else if($role_type === 'User') {
        $request->session()->put('success');
        return redirect()->route('user');
    }
} else {
    return redirect()->route('login')->with('login_error', 'Invalid 
            credentials entered');
}

1

solved Syntax error: unexpected ;