Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lesichkovm authored Sep 26, 2024
1 parent 9fb6ca9 commit 9fc18e1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,20 @@ AdvancedRoute::controller('/{YOUR PATH}', '{YOUR CONTROLLER FULL NAME}');

```php
Route::group(['prefix' => '/', 'middleware' => []], function () {
AdvancedRoute::controller('/auth', 'AuthController');
AdvancedRoute::controller('/cms', 'CmsController');
AdvancedRoute::controller('/shop', 'ShopController');
Route::any('/', 'WebsiteController@anyIndex');
AdvancedRoute::controller('/auth', '\\' . \App\Http\Controllers\AuthController);
AdvancedRoute::controller('/cms', '\\' . \App\Http\Controllers\CmsController);
AdvancedRoute::controller('/shop', '\\' . \App\Http\Controllers\ShopController);
Route::any('/', '\\' . \App\Http\Controllers\WebsiteController@anyIndex);
});
```

### Multiple controllers mapping: ###

```php
AdvancedRoute::controllers([
'/auth' => 'AuthController',
'/cms' => 'CmsController',
'/shop' => 'ShopController',
'/auth' => '\\' . \App\Http\Controllers\AuthController,
'/cms' => '\\' . \App\Http\Controllers\CmsController,
'/shop' => '\\' . \App\Http\Controllers\ShopController,
]);
```

Expand Down

0 comments on commit 9fc18e1

Please sign in to comment.