| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function up() |
||
| 28 | { |
||
| 29 | Schema::create(config('rinvex.fort.tables.persistences'), function (Blueprint $table) { |
||
| 30 | // Columns |
||
| 31 | $table->string('token'); |
||
| 32 | $table->integer('user_id')->unsigned(); |
||
| 33 | $table->string('agent')->nullable(); |
||
| 34 | $table->string('ip')->nullable(); |
||
| 35 | $table->boolean('attempt')->default(0); |
||
| 36 | $table->timestamps(); |
||
| 37 | |||
| 38 | // Indexes |
||
| 39 | $table->primary('token'); |
||
| 40 | $table->foreign('user_id') |
||
| 41 | ->references('id') |
||
| 42 | ->on(config('rinvex.fort.tables.users')) |
||
| 43 | ->onDelete('cascade') |
||
| 44 | ->onUpdate('cascade'); |
||
| 45 | |||
| 46 | // Engine |
||
| 47 | $table->engine = 'InnoDB'; |
||
| 48 | }); |
||
| 49 | } |
||
| 50 | |||
| 61 |
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.