Skip to content

Commit

Permalink
Merge pull request #1630 from solomon-ochepa/patch-3
Browse files Browse the repository at this point in the history
Update route-provider.stub
  • Loading branch information
dcblogdev authored Oct 22, 2023
2 parents ab4121c + b1e1bea commit 1250c77
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/Commands/stubs/route-provider.stub
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,23 @@ class $CLASS$ extends ServiceProvider
{
/**
* The module namespace to assume when generating URLs to actions.
*
* @var string
*/
protected $moduleNamespace = '$MODULE_NAMESPACE$\$MODULE$\$CONTROLLER_NAMESPACE$';

/**
* Called before routes are registered.
*
* Register any model bindings or pattern based filters.
*
* @return void
*/
public function boot()
public function boot(): void
{
parent::boot();
}

/**
* Define the routes for the application.
*
* @return void
*/
public function map()
public function map(): void
{
$this->mapApiRoutes();

Expand All @@ -42,10 +36,8 @@ class $CLASS$ extends ServiceProvider
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
protected function mapWebRoutes(): void
{
Route::middleware('web')
->namespace($this->moduleNamespace)
Expand All @@ -56,10 +48,8 @@ class $CLASS$ extends ServiceProvider
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
protected function mapApiRoutes(): void
{
Route::prefix('api')
->middleware('api')
Expand Down

0 comments on commit 1250c77

Please sign in to comment.