registerWebRoutes(); $this->registerAdminRoutes(); $this->registerApiRoutes(); } /** * */ protected function registerWebRoutes(): void { $config = [ 'as' => '$LOWER_NAME$.', 'prefix' => '$LOWER_NAME$', 'namespace' => $this->namespace.'\Frontend', 'middleware' => ['web'], ]; Route::group($config, function() { $this->loadRoutesFrom(__DIR__.'/../Http/Routes/web.php'); }); } protected function registerAdminRoutes(): void { $config = [ 'as' => 'admin.$LOWER_NAME$.', 'prefix' => 'admin/$LOWER_NAME$', 'namespace' => $this->namespace.'\Admin', 'middleware' => ['web', 'role:admin'], ]; Route::group($config, function() { $this->loadRoutesFrom(__DIR__.'/../Http/Routes/admin.php'); }); } /** * Register any API routes your module has. Remove this if you aren't using any */ protected function registerApiRoutes(): void { $config = [ 'as' => 'api.$LOWER_NAME$.', 'prefix' => 'api/$LOWER_NAME$', 'namespace' => $this->namespace.'\Api', 'middleware' => ['api'], ]; Route::group($config, function() { $this->loadRoutesFrom(__DIR__.'/../Http/Routes/api.php'); }); } }