2017 © Pedro PelĂĄez
 

library laravel-multi-auth

Laravel 5.1 package for laravel multi auth.

image

andrewboy/laravel-multi-auth

Laravel 5.1 package for laravel multi auth.

  • Monday, August 15, 2016
  • by andrewboy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 398 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 43 % Grown

The README.md

Multi Auth for Laravel 5.1

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)

Overwritten traits

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

Installation steps

  1. First setup the Kbwebs/MultiAuth package
  2. In config/app.php set the provider:, (*10)

    ...
    'providers' => [
        ...
        Andrewboy\LaravelMultiAuth\LaravelMultiAuthServiceProvider::class,
    ],
    ...
    
  3. 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)

The Versions

15/08 2016

dev-master

9999999-dev

Laravel 5.1 package for laravel multi auth.

  Sources   Download

The Requires

 

The Development Requires

by Beck AndrĂĄs

laravel auth multi