Skip to content

Commit

Permalink
Sync relevant docs between v5 and v6
Browse files Browse the repository at this point in the history
  • Loading branch information
drbyte committed Oct 16, 2023
1 parent c26ad91 commit a36dfda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/basic-usage/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ protected $middlewareAliases = [
];
```

**YOU SHOULD ALSO** set [the `$middlewarePriority` array](https://laravel.com/docs/master/middleware#sorting-middleware) to include this package's middleware before the `SubstituteBindings` middleware, else you may get *404 Not Found* responses when a *403 Not Authorized* response might be expected.

## Middleware via Routes

Then you can protect your routes using middleware rules:
Expand Down
6 changes: 4 additions & 2 deletions docs/basic-usage/teams-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ Example Team Middleware:
```php
namespace App\Http\Middleware;

class TeamsPermission{
class TeamsPermission
{

public function handle($request, \Closure $next){
if(!empty(auth()->user())){
Expand All @@ -52,7 +53,8 @@ class TeamsPermission{
}
}
```
NOTE: You must add your custom `Middleware` to `$middlewarePriority` in `app/Http/Kernel.php`.

**YOU MUST ALSO** set [the `$middlewarePriority` array](https://laravel.com/docs/master/middleware#sorting-middleware) in `app/Http/Kernel.php` to include your custom middleware before the `SubstituteBindings` middleware, else you may get *404 Not Found* responses when a *403 Not Authorized* response might be expected.

## Roles Creating

Expand Down

0 comments on commit a36dfda

Please sign in to comment.