| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | $connection = config('roles.connection'); |
||
| 17 | $table = config('roles.rolesTable'); |
||
| 18 | $tableCheck = Schema::connection($connection)->hasTable($table); |
||
| 19 | |||
| 20 | if (!$tableCheck) { |
||
| 21 | Schema::connection($connection)->create($table, function (Blueprint $table) { |
||
| 22 | $table->increments('id')->unsigned(); |
||
| 23 | $table->string('name'); |
||
| 24 | $table->string('slug')->unique(); |
||
| 25 | $table->string('description')->nullable(); |
||
| 26 | $table->integer('level')->default(1); |
||
| 27 | $table->timestamps(); |
||
| 28 | $table->softDeletes(); |
||
| 29 | }); |
||
| 45 |