From 7ac9a4ab2c978bdbb7430f1cb6f2323edef0e0ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Sun, 20 Jan 2019 17:35:02 +0100 Subject: [PATCH] Fix code block formatting --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 591d9d60..eec67863 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,11 @@ composer require stancl/tenancy The `TenancyServiceProvider` automatically adds the `tenancy` middleware group which can be assigned to routes. You only need to make sure the middleware is top priority. Open `app/Http/Kernel.php` and make the middleware top priority, so that it gets executed before anything else, making sure things like the database switch connections soon enough. - ```php - protected $middlewarePriority = [ - \Stancl\Tenancy\Middleware\InitializeTenancy::class, - ``` + +```php +protected $middlewarePriority = [ + \Stancl\Tenancy\Middleware\InitializeTenancy::class, +``` When a tenant route is visited, but the tenant can't be identified, an exception is thrown. If you want to change this behavior, to a redirect for example, add this to your `app/Providers/AppServiceProvider.php`'s `boot()` method.