| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class CreateQuizzesTable extends Migration |
||
|
|
|||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Run the migrations. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | if (Schema::hasTable('quizzes')) return; |
||
| 17 | |||
| 18 | Schema::create('quizzes', function (Blueprint $table) { |
||
| 19 | $table->increments('id'); |
||
| 20 | $table->string('quiz_name', 80); |
||
| 21 | $table->text('quiz_description'); |
||
| 22 | $table->timestamps(); |
||
| 23 | }); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Reverse the migrations. |
||
| 28 | * |
||
| 29 | * @return void |
||
| 30 | */ |
||
| 31 | public function down() |
||
| 34 | } |
||
| 35 | } |
||
| 36 |
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.