einice / confide
此包已被弃用且不再维护。未建议替代包。
Confide 是 Laravel 5.1 的认证解决方案
1.3
2015-10-07 20:22 UTC
Requires
- php: >=5.5.9
- illuminate/support: ~5.1
This package is not auto-updated.
Last update: 2016-08-31 13:36:40 UTC
README
这个包是基于 Zizaco/confide 修改的,仅为了支持 laravel 5.1.x
安装
执行
composer require einice/confide
注册服务提供者
'providers' => [
// ...
Einice\Confide\ServiceProvider::class,
]
注册外观
'aliases' => [
// ...
'Confide' => Einice\Confide\Facade::class,
]
生成数据库文件(需要删除 database/migrations 下的两个自带文件)
php artisan confide:migration
安装数据表
php artisan migrate
修改 user.php 模型
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Einice\Confide\ConfideUser;
use Einice\Confide\ConfideUserInterface;
class User extends Model implements ConfideUserInterface
{
use ConfideUser;
}
生成控制器和路由
php artisan confide:controller php artisan confide:routes
或者也可以生成 RESTful 风格的控制和路由
php artisan confide:controller --restful php artisan confide:routes --restful