Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 14 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | $tenant_singular = str_singular(config('multi-tenant.table_name')); |
||
17 | |||
18 | Schema::create($tenant_singular . '_user', function (Blueprint $table) use ($tenant_singular) { |
||
19 | $table->increments('id'); |
||
20 | $table->integer($tenant_singular . '_id')->unsigned(); |
||
21 | $table->integer('user_id')->unsigned(); |
||
22 | $table->timestamps(); |
||
23 | |||
24 | $table->index($tenant_singular . '_id', $tenant_singular . '_user_' . $tenant_singular . '_id_index'); |
||
25 | $table->index('user_id', $tenant_singular . '_user_user_id_index'); |
||
26 | }); |
||
27 | } |
||
28 | |||
39 |
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.