| Conditions | 1 |
| Paths | 1 |
| Total Lines | 30 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | |||
| 17 | Schema::create('Rule', function (Blueprint $table) { |
||
| 18 | $table->increments('id'); |
||
| 19 | $table->string('title', 100); |
||
| 20 | $table->text('rule'); |
||
| 21 | $table->binary('status'); |
||
| 22 | |||
| 23 | $table->timestamps(); |
||
| 24 | $table->softDeletes(); |
||
| 25 | $table->creation(); |
||
| 26 | }); |
||
| 27 | |||
| 28 | Schema::create('RuleTree', function (Blueprint $table) { |
||
| 29 | $table->increments('id'); |
||
| 30 | $table->string('title', 100)->nullable(); |
||
| 31 | $table->integer('rule')->unsigned()->nullable(); |
||
| 32 | $table->integer('parent')->unsigned()->nullable(); |
||
| 33 | $table->string('list', 100); |
||
| 34 | |||
| 35 | $table->timestamps(); |
||
| 36 | $table->softDeletes(); |
||
| 37 | $table->creation(); |
||
| 38 | |||
| 39 | $table->foreign('rule')->references('id')->on('Rule'); |
||
| 40 | $table->foreign('parent')->references('id')->on('RuleTree'); |
||
| 41 | }); |
||
| 42 | |||
| 43 | } |
||
| 44 | |||
| 59 |
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.