| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | if (Schema::hasTable('activations')) return; |
||
| 17 | |||
| 18 | Schema::create('activations', function (Blueprint $table) { |
||
| 19 | $table->increments('id'); |
||
| 20 | $table->integer('user_id')->unsigned()->index(); |
||
| 21 | $table->string('token'); |
||
| 22 | $table->ipAddress('ip_address'); |
||
| 23 | $table->timestamps(); |
||
| 24 | |||
| 25 | $table->foreign('user_id') |
||
| 26 | ->references('id') |
||
| 27 | ->on('users') |
||
| 28 | ->onDelete('cascade') |
||
| 29 | ->onUpdate('cascade'); |
||
| 30 | }); |
||
| 43 |
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.