承接 iwanli/multi-auth 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iwanli/multi-auth

Composer 安装命令:

composer require iwanli/multi-auth

包简介

create multi-auth for laravel5.2

README 文档

README

Custom your Auth Drivers

Installation

composer require iwanli/multi-auth

Or

First, pull in the package through Composer.

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

Now you'll want to update or install via composer.

composer update

Providers

open your config/app.php and add this line in providers section .

Iwanli\MultiAuth\MultiAuthServiceProvider::class,

Configuration

And the last, publish the package's configuration by running:

php artisan vendor:publish

That will publish the multi.php config file to your config/ folder .

<?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

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

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

Ok,that's all, enjoy it!

统计信息

  • 总下载量: 31
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固