| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | if (Schema::hasTable('quiz_questions')) return; |
||
| 17 | |||
| 18 | Schema::create('quiz_questions', function (Blueprint $table) { |
||
| 19 | $table->increments('id'); |
||
| 20 | $table->integer('quiz_id')->unsigned()->index(); |
||
| 21 | $table->text('question'); |
||
| 22 | $table->timestamps(); |
||
| 23 | |||
| 24 | $table->foreign('quiz_id') |
||
| 25 | ->references('id') |
||
| 26 | ->on('quizzes') |
||
| 27 | ->onDelete('cascade') |
||
| 28 | ->onUpdate('cascade'); |
||
| 29 | }); |
||
| 42 |
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.