dev-master
9999999-devLaravel 5.1 package for laravel multi auth.
The Requires
- php >=5.5.9
- kbwebs/multiauth ~1.0
The Development Requires
by Beck AndrĂĄs
laravel auth multi
Laravel 5.1 package for laravel multi auth.
This package can be use with only 5.1 version of laravel. This package extends the Kbwebs/MultiAuth package by overriding the default single laravel auth traits. With this package you can easily use the auth mechanism that laravel default offers., (*1)
AuthenticatesAndRegistersUsers, (*2)
Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers
to, (*3)
Andrewboy\LaravelMultiAuth\Traits\AuthenticatesAndRegistersUsers
AuthenticatesUsers, (*4)
Illuminate\Foundation\Auth\AuthenticatesUsers
to, (*5)
Andrewboy\LaravelMultiAuth\Traits\AuthenticatesUsers
RegistersUsers, (*6)
Illuminate\Foundation\Auth\RegistersUsers
to, (*7)
Andrewboy\LaravelMultiAuth\Traits\RegistersUsers
ResetsPasswords, (*8)
Illuminate\Foundation\Auth\ResetsPasswords
to, (*9)
Andrewboy\LaravelMultiAuth\Traits\ResetsPasswords
In config/app.php set the provider:, (*10)
... 'providers' => [ ... Andrewboy\LaravelMultiAuth\LaravelMultiAuthServiceProvider::class, ], ...
Set the controllers, (*11)
AuthController, (*12)
use Andrewboy\LaravelMultiAuth\Traits\AuthenticatesAndRegistersUsers; class AuthController extends Controller { use AuthenticatesAndRegistersUsers, ThrottlesLogins; protected $entity = 'admin'; ... }
PasswordController, (*13)
use Andrewboy\LaravelMultiAuth\Traits\ResetsPasswords; class PasswordController extends Controller { use ResetsPasswords; protected $entity = 'admin'; ... }
Note: if you have only one entity, then you don't have to use the protected $entity property., (*14)
Laravel 5.1 package for laravel multi auth.
laravel auth multi