Bristol SU Support Package
CheckActivityEnabled.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
12 {
13 
22  public function handle(Request $request, \Closure $next)
23  {
24  $activity = $request->route('activity_slug');
25  if(!$activity->enabled) {
26  throw ActivityDisabled::fromActivity($activity);
27  }
28  return $next($request);
29  }
30 
31 }