|
@@ -15,13 +15,13 @@ |
|
|
block discarded – undo |
|
15
|
15
|
*/ |
|
16
|
16
|
public function handle($request, Closure $next) |
|
17
|
17
|
{ |
|
18
|
|
- if($request->user()->super_admin == 1){ |
|
|
18
|
+ if ($request->user()->super_admin == 1) { |
|
19
|
19
|
return $next($request); |
|
20
|
|
- }elseif ($request->user() && (!($request->user()->permissions->isEmpty())) && $request->user()->permissions[0]->roles && $request->user()->permissions[0]->roles->code === 'HOMEROOM_TEACHER') { |
|
|
20
|
+ }elseif ($request->user() && (!($request->user()->permissions->isEmpty())) && $request->user()->permissions[0]->roles && $request->user()->permissions[0]->roles->code === 'HOMEROOM_TEACHER') { |
|
21
|
21
|
return $next($request); |
|
22
|
|
- }elseif($request->user() && (!($request->user()->principal->isEmpty())) && $request->user()->principal[0]->roles && $request->user()->principal[0]->roles->code === 'PRINCIPAL'){ |
|
|
22
|
+ }elseif ($request->user() && (!($request->user()->principal->isEmpty())) && $request->user()->principal[0]->roles && $request->user()->principal[0]->roles->code === 'PRINCIPAL') { |
|
23
|
23
|
return $next($request); |
|
24
|
|
- }elseif($request->user() && (!($request->user()->zonal_cordinator->isEmpty())) && $request->user()->zonal_cordinator[0]->roles && $request->user()->zonal_cordinator[0]->roles->code === 'PRINCIPAL'){ |
|
|
24
|
+ }elseif ($request->user() && (!($request->user()->zonal_cordinator->isEmpty())) && $request->user()->zonal_cordinator[0]->roles && $request->user()->zonal_cordinator[0]->roles->code === 'PRINCIPAL') { |
|
25
|
25
|
return $next($request); |
|
26
|
26
|
} |
|
27
|
27
|
return redirect('/login')->with('status', 'Your dont have access for upload data. Please get assign your to the class and try'); |
Please login to merge, or discard this patch.