mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 02:04:03 +00:00
spatie/laravel-login-link Installation
Installation Instructions for spatie/laravel-login-link
This commit is contained in:
parent
b8d7466496
commit
c730bca541
1 changed files with 27 additions and 0 deletions
|
|
@ -72,3 +72,30 @@ Then, change the `url_generator` in the media-library config to the custom one (
|
|||
```php
|
||||
'url_generator' => TenantAwareUrlGenerator::class,
|
||||
```
|
||||
|
||||
## **laravel-login-link** {#laravel-login-link}
|
||||
|
||||
After Installing the package, publish the config file:
|
||||
|
||||
```sh
|
||||
php artisan vendor:publish --tag="login-link-config"
|
||||
```
|
||||
|
||||
Then open the config file and add the appropriate tenant identification middlewares in the `middleware` config key:
|
||||
|
||||
> Make sure to use the **Tenant Identification** method that you are using in your application's tenant routes.
|
||||
|
||||
```php
|
||||
|
||||
/*
|
||||
* This middleware will be applied on the route
|
||||
* that logs in a user via a link.
|
||||
*/
|
||||
'middleware' => [
|
||||
'web',
|
||||
InitializeTenancyByDomain::class,
|
||||
PreventAccessFromCentralDomains::class,
|
||||
],
|
||||
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue