/**
  * Register the routes for handling broadcast authentication and sockets.
  *
  * @param  array|null  $attributes
  * @return void
  */
 public function routes(array $attributes = null)
 {
     if ($this->app->routesAreCached()) {
         return;
     }
     $attributes = $attributes ?: ['middleware' => ['web']];
     $this->app['router']->group($attributes, function ($router) {
         $router->post('/broadcasting/auth', BroadcastController::class . '@authenticate');
     });
 }
 /**
  * Register the routes for handling broadcast authentication and sockets.
  *
  * @param  array  $attributes
  * @return void
  */
 public function route(array $attributes = [])
 {
     if ($this->app->routesAreCached()) {
         return;
     }
     $this->app['router']->group($attributes, function () {
         $this->app['router']->post('/broadcasting/auth', BroadcastController::class . '@authenticate');
         $this->app['router']->post('/broadcasting/socket', BroadcastController::class . '@rememberSocket');
     });
 }
 /**
  * Registers routes for the entire CMS.
  *
  * @return $this
  */
 protected function registerRoutes()
 {
     // If the application has all routes cached, skip registering them
     if ($this->app->routesAreCached()) {
         return $this;
     }
     $this->router->group(['prefix' => $this->getCmsPrefix(), 'as' => $this->getCmsNamePrefix(), 'middleware' => [$this->getCmsMiddlewareGroup()]], function (Router $router) {
         $this->buildRoutesForAuth($router);
         // Embed the routes that require authorization in a group
         // with the middleware to keep guests out.
         $this->router->group(['middleware' => [CmsMiddleware::API_AUTHENTICATED, CmsMiddleware::API_AUTH_OWNER]], function (Router $router) {
             $this->buildRoutesForMetaData($router);
             $this->buildRoutesForModules($router);
         });
     });
     return $this;
 }
Example #4
0
 /**
  * Determine if the application routes are cached.
  *
  * @return bool 
  * @static 
  */
 public static function routesAreCached()
 {
     return \Illuminate\Foundation\Application::routesAreCached();
 }