mapApiRoutes(); $this->mapWebRoutes(); $this->mapChannelRoutes(); } /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes() { Route::middleware('web') ->namespace($this->moduleNamespace) ->group(module_path('Chat', '/Routes/web.php')); } /** * Define the "api" routes for the application. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::prefix('api') ->middleware('api') ->namespace($this->moduleNamespace) ->group(module_path('Chat', '/Routes/api.php')); } protected function mapChannelRoutes() { Route::middleware('channel') ->namespace($this->moduleNamespace) ->group(module_path('Chat', '/Routes/channels.php')); } }