Example #1
0
 /**
  * Create a new HTTP kernel instance.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @param  \CupOfTea\TwoStream\Routing\WsRouter  $router
  * @return void
  */
 public function __construct(Application $app, WsRouter $router)
 {
     $this->app = $app;
     $this->app['config']['session.driver'] = 'array';
     $this->router = $router;
     foreach ($this->routeMiddleware as $key => $middleware) {
         $router->middleware($key, $middleware);
     }
 }
 /**
  * Define the routes for the application.
  *
  * @param  \CupOfTea\TwoStream\Routing\WsRouter  $router
  * @return void
  */
 public function map(WsRouter $router)
 {
     $router->group(['namespace' => $this->namespace], function ($router) {
         require app_path('Ws/routes.php');
     });
 }