Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function up() |
||
28 | { |
||
29 | Schema::create(config('rinvex.fort.tables.socialite'), function (Blueprint $table) { |
||
1 ignored issue
–
show
|
|||
30 | // Columns |
||
31 | $table->increments('id'); |
||
32 | $table->integer('user_id')->unsigned(); |
||
33 | $table->string('provider'); |
||
34 | $table->integer('provider_uid')->unsigned(); |
||
35 | $table->timestamps(); |
||
36 | |||
37 | // Indexes |
||
38 | $table->index('user_id'); |
||
39 | $table->unique([ |
||
40 | 'provider', |
||
41 | 'provider_uid', |
||
42 | ]); |
||
43 | $table->foreign('user_id') |
||
44 | ->references('id') |
||
45 | ->on(config('rinvex.fort.tables.users')) |
||
46 | ->onDelete('cascade') |
||
47 | ->onUpdate('cascade'); |
||
48 | |||
49 | // Engine |
||
50 | $table->engine = 'InnoDB'; |
||
51 | }); |
||
52 | } |
||
53 | |||
64 |
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.