Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function up() |
||
17 | { |
||
18 | Schema::disableForeignKeyConstraints(); |
||
19 | |||
20 | Schema::create('sessions', function (Blueprint $table) { |
||
21 | // Columns |
||
22 | $table->string('id')->unique(); |
||
23 | $table->unsignedInteger('user_id')->nullable(); |
||
24 | $table->string('ip_address', 45)->nullable(); |
||
25 | $table->text('user_agent')->nullable(); |
||
26 | $table->text('payload'); |
||
27 | $table->integer('last_activity'); |
||
28 | |||
29 | // Indexes |
||
30 | $table->foreign('user_id')->references('id')->on(config('rinvex.fort.tables.users')) |
||
31 | ->onDelete('cascade')->onUpdate('cascade'); |
||
32 | }); |
||
33 | |||
34 | Schema::enableForeignKeyConstraints(); |
||
35 | } |
||
36 | |||
51 |
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.