spatie/laravel-permission

Unclear middleware doc

AyubM opened this issue · 1 comments

AyubM commented

https://github.com/spatie/laravel-permission/blob/main/docs/basic-usage/middleware.md

In the section following

 Alternatively, you can separate multiple roles or permission with a | (pipe) character:

It's not clear if adding | makes it behave as OR or AND. I would put in the // comment below each example the effect it will have. e.g.

Route::group(['middleware' => ['permission:publish articles|edit articles']], function () {
    // If the user has the permission to publish OR edit articles, they will be allowed.
});

That is not a bug or an issue, next time use discussions section or make a PR to make it clearer