Bristol SU Support Package
CheckModuleInstanceEnabled.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  $moduleInstance = $request->route('module_instance_slug');
25  if(!$moduleInstance->enabled) {
26  throw ModuleInstanceDisabled::fromModuleInstance($moduleInstance);
27  }
28  return $next($request);
29  }
30 
31 }