2017 © Pedro Peláez
 

library multi-auth

create multi-auth for laravel5.2

image

iwanli/multi-auth

create multi-auth for laravel5.2

  • Tuesday, August 9, 2016
  • by iwanli
  • Repository
  • 1 Watchers
  • 2 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

multi-auth

Custom your Auth Drivers, (*1)

Installation

composer require iwanli/multi-auth

Or, (*2)

First, pull in the package through Composer., (*3)

"iwanli/multi-auth": "~0.1.*"

Now you'll want to update or install via composer., (*4)

composer update

Providers

open your config/app.php and add this line in providers section ., (*5)

Iwanli\MultiAuth\MultiAuthServiceProvider::class,

Configuration

And the last, publish the package's configuration by running:, (*6)

php artisan vendor:publish

That will publish the multi.php config file to your config/ folder ., (*7)

<?php
return [
    /**
     * auth view directroy
     */
    'directory' =>[
        'layouts'   => 'resources/views/layouts',
        'auth'      => [
            'passwords' => 'resources/views/multi-auth/passwords',
            'emails'    => 'resources/views/multi-auth/emails'
        ]
    ],
    /**
     * auth view file name 
     */
    'views' => [
        'login'     => 'multi-auth/login.blade.php',
        'register'  => 'multi-auth/register.blade.php',
        'email'     => 'multi-auth/passwords/email.blade.php',
        'reset'     => 'multi-auth/passwords/reset.blade.php',
        'password'  => 'multi-auth/emails/password.blade.php',
        'app'       => 'layouts/app.blade.php',
        'home'      => 'home.blade.php',
        'welcome'   => 'welcome.blade.php',
    ],
    /*
    |--------------------------------------------------------------------------
    | Authentication Guards
    |--------------------------------------------------------------------------
    */
    'auth' => [
        'guards' => [
            'admin' => [
                'driver'    => 'session',
                'provider'  => 'admins',
            ]
        ],
        'providers' => [
            'admins' => [
                'driver' => 'eloquent',
                /**
                 * According to this configuration will create the corresponding model and migration
                 */
                'model' => 'App\Models\Admin',
            ],
        ],
        /**
         * Plan development...
         */
        'passwords' => [
            'admins' => [
                'provider' => 'admins',
                'email' => 'mulit-auth.emails.password',
                'table' => 'password_resets',
                'expire' => 60,
            ],
        ],
        /**
         * The route of the jump after the success of the certification
         */
        'redirectTo' => '/admin',
        /**
         * custom AuthController login view
         */
        'loginView' => 'multi-auth.login',
        /**
         * custom AuthController register view
         */
        'registerView' => 'multi-auth.register',
    ]
];

Usage

php artisan make:multi-auth Admin/LoginController

Or mandatory coverage of existing documents, (*8)

php artisan make:multi-auth Admin/LoginController --force

The Artisan command generates the routes, views controller and update Authenticate middleware required for user authentication ., (*9)

Ok,that's all, enjoy it!, (*10)

The Versions

09/08 2016

dev-master

9999999-dev

create multi-auth for laravel5.2

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Avatar iwanli

l5 laravel5 multi-auth

09/08 2016

v0.1.7

0.1.7.0

create multi-auth for laravel5.2

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Avatar iwanli

l5 laravel5 multi-auth

09/08 2016

v0.1.6

0.1.6.0

create multi-auth for laravel5.2

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Avatar iwanli

l5 laravel5 multi-auth

05/08 2016

v0.1.5

0.1.5.0

create multi-auth for laravel5.2

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Avatar iwanli

l5 laravel5 multi-auth

05/08 2016

v0.1.4

0.1.4.0

create multi-auth for laravel5.2

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

by Avatar iwanli

l5 laravel5 multi-auth

05/08 2016

v0.1.3

0.1.3.0

  Sources   Download

The Requires

  • php >=5.5.9

 

by Avatar iwanli

05/08 2016

v0.1.2

0.1.2.0

  Sources   Download

The Requires

  • php >=5.5.9

 

by Avatar iwanli

04/08 2016

v0.1.1

0.1.1.0

  Sources   Download

The Requires

  • php >=5.5.9

 

by Avatar iwanli

04/08 2016

v0.1.0

0.1.0.0

  Sources   Download

The Requires

  • php >=5.5.9

 

by Avatar iwanli