Skip to content

Commit

Permalink
Update route-provider.stub
Browse files Browse the repository at this point in the history
Format to the current Laravel standard.
  • Loading branch information
solomon-ochepa authored Oct 20, 2023
1 parent ef67a73 commit b1e1bea
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 b1e1bea

Please sign in to comment.