@@ 29-37 (lines=9) @@ | ||
26 | { |
|
27 | // Create table for admin user |
|
28 | if ($this->userTable != 'users') { |
|
29 | Schema::create($this->userTable, function (Blueprint $table) { |
|
30 | $table->engine = "InnoDB COMMENT='管理员表'"; |
|
31 | $table->increments('id'); |
|
32 | $table->string('name')->unique()->comment('名称'); |
|
33 | $table->string('email')->nullable()->unique()->comment('邮箱'); |
|
34 | $table->string('password')->nullable()->comment('密码'); |
|
35 | $table->rememberToken(); |
|
36 | $table->timestamps(); |
|
37 | }); |
|
38 | } |
|
39 | ||
40 | // Create table for storing roles |
|
@@ 41-48 (lines=8) @@ | ||
38 | } |
|
39 | ||
40 | // Create table for storing roles |
|
41 | Schema::create('roles', function (Blueprint $table) { |
|
42 | $table->engine = "InnoDB COMMENT='角色表'"; |
|
43 | $table->increments('id'); |
|
44 | $table->string('name')->unique()->comment('名称'); |
|
45 | $table->string('display_name')->nullable()->comment('显示名'); |
|
46 | $table->string('description')->nullable()->comment('备注'); |
|
47 | $table->timestamps(); |
|
48 | }); |
|
49 | ||
50 | // Create table for associating roles to users (Many-to-Many) |
|
51 | Schema::create('role_user', function (Blueprint $table) { |