|
@@ 15-21 (lines=7) @@
|
| 12 |
|
public function up() |
| 13 |
|
{ |
| 14 |
|
// Create table for storing roles |
| 15 |
|
Schema::create('roles', function (Blueprint $table) { |
| 16 |
|
$table->increments('id'); |
| 17 |
|
$table->string('name')->unique(); |
| 18 |
|
$table->string('display_name')->nullable(); |
| 19 |
|
$table->string('description')->nullable(); |
| 20 |
|
$table->timestamps(); |
| 21 |
|
}); |
| 22 |
|
|
| 23 |
|
// Create table for associating roles to users (Many-to-Many) |
| 24 |
|
Schema::create('role_user', function (Blueprint $table) { |
|
@@ 37-43 (lines=7) @@
|
| 34 |
|
}); |
| 35 |
|
|
| 36 |
|
// Create table for storing permissions |
| 37 |
|
Schema::create('permissions', function (Blueprint $table) { |
| 38 |
|
$table->increments('id'); |
| 39 |
|
$table->string('name')->unique(); |
| 40 |
|
$table->string('display_name')->nullable(); |
| 41 |
|
$table->string('description')->nullable(); |
| 42 |
|
$table->timestamps(); |
| 43 |
|
}); |
| 44 |
|
|
| 45 |
|
// Create table for associating permissions to roles (Many-to-Many) |
| 46 |
|
Schema::create('permission_role', function (Blueprint $table) { |