如何在Laravel中设置Auth以及何时使用两个模块

时间:2019-07-03 16:03:18

标签: laravel-5

我安装了la-ravel,但仅在一个模块中管理,但我想使用其他模块,例如admin,super admin

php artisan make:auth

1 个答案:

答案 0 :(得分:1)

https://medium.com/justlaravel/how-to-use-middleware-for-content-restriction-based-on-user-role-in-laravel-2d0d8f8e94c6

public function up()
{
Schema::create(‘users’, function (Blueprint $table) {
$table->increments(‘id’);
$table->string(‘name’);
$table->string(‘email’)->unique();
$table->string(‘password’);
$table->strint('adminrole');
$table->string(‘type’);
$table->rememberToken();
$table->timestamps();
 });
}