| Total Complexity | 2 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class CreatePcmmPermissionsTable extends Migration |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Run the migrations. |
||
| 12 | * |
||
| 13 | * @return void |
||
| 14 | */ |
||
| 15 | public function up() |
||
| 16 | { |
||
| 17 | Schema::create('pcmm_permissions', function (Blueprint $table) { |
||
| 18 | $table->increments('id'); |
||
| 19 | $table->integer('menu_id')->unsigned()->index(); |
||
| 20 | $table->string('namespace', 255)->index(); |
||
| 21 | $table->string('controller', 255)->index(); |
||
| 22 | $table->enum('method', ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'])->index(); |
||
| 23 | $table->string('action', 255)->index(); |
||
| 24 | $table->boolean('allowed')->default(true); |
||
| 25 | $table->timestamps(); |
||
| 26 | |||
| 27 | }); |
||
| 28 | |||
| 29 | Artisan::call('db:seed', [ |
||
| 30 | '--class' => PcmmPermissionsTableSeeder::class, |
||
| 31 | '--force' => true |
||
| 32 | ]); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Reverse the migrations. |
||
| 37 | * |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | public function down() |
||
| 43 | } |
||
| 44 | } |
||
| 45 |