Skip to content

Commit

Permalink
[Docs] Specifying a guard in middleware calls
Browse files Browse the repository at this point in the history
  • Loading branch information
drbyte authored Aug 21, 2023
1 parent 6cbe27e commit 06714c7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/basic-usage/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ Route::group(['middleware' => ['role:manager']], function () {
//
});

// for a specific guard:
Route::group(['middleware' => ['role:manager,api']], function () {
//
});

Route::group(['middleware' => ['permission:publish articles']], function () {
//
});
Expand All @@ -73,6 +78,11 @@ Route::group(['middleware' => ['permission:publish articles|edit articles']], fu
//
});

// for a specific guard
Route::group(['middleware' => ['permission:publish articles|edit articles,api']], function () {
//
});

Route::group(['middleware' => ['role_or_permission:manager|edit articles']], function () {
//
});
Expand Down

0 comments on commit 06714c7

Please sign in to comment.