Beispiel #1
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next, $slug)
 {
     $request->session()->put('module', $this->module->where('slug', $slug)->first());
     return $next($request);
 }
Beispiel #2
0
 /**
  * Handle an incoming request.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Closure                 $next
  *
  * @return mixed
  */
 public function handle($request, Closure $next, $slug = null)
 {
     $request->session()->flash('module', $this->module->where('slug', $slug));
     return $next($request);
 }