Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function up() |
||
28 | { |
||
29 | Schema::create(config('rinvex.fort.tables.socialites'), function (Blueprint $table) { |
||
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->unique([ |
||
39 | 'provider', |
||
40 | 'provider_uid', |
||
41 | ]); |
||
42 | $table->foreign('user_id') |
||
43 | ->references('id') |
||
44 | ->on(config('rinvex.fort.tables.users')) |
||
45 | ->onDelete('cascade') |
||
46 | ->onUpdate('cascade'); |
||
47 | |||
48 | // Engine |
||
49 | $table->engine = 'InnoDB'; |
||
50 | }); |
||
51 | } |
||
52 | |||
63 |
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.