Total Complexity | 2 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class CreateLgpDictTable extends Migration |
||
|
|||
10 | { |
||
11 | /** |
||
12 | * Run the migrations. |
||
13 | * |
||
14 | * @return void |
||
15 | */ |
||
16 | public function up() |
||
17 | { |
||
18 | Schema::create('lgp_dict', function (Blueprint $table) { |
||
19 | $table->id(); |
||
20 | $table->string('name'); |
||
21 | $table->string('type')->default('select'); |
||
22 | $table->timestamps(); |
||
23 | }); |
||
24 | Schema::create('lgp_dict_option', function (Blueprint $table) { |
||
25 | $table->id(); |
||
26 | $table->string('name'); |
||
27 | $table->text('json')->nullable(); |
||
28 | $table->integer('dict_id')->references('id')->on('lgp_dict'); |
||
29 | $table->timestamps(); |
||
30 | }); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Reverse the migrations. |
||
35 | * |
||
36 | * @return void |
||
37 | */ |
||
38 | public function down() |
||
42 | } |
||
43 | } |
||
44 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.