Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 6 |
Ratio | 35.29 % |
Changes | 0 |
1 | <?php |
||
17 | public function up() |
||
18 | { |
||
19 | Schema::create('modules', function (Blueprint $table) { |
||
20 | $table->increments('id'); |
||
21 | $table->string('name'); |
||
22 | $table->unsignedTinyInteger('order')->nullable(); |
||
23 | $table->integer('study_id')->unsigned(); |
||
24 | $table->timestamps(); |
||
25 | $table->unique(array('name', 'order','study_id')); |
||
26 | }); |
||
27 | View Code Duplication | Schema::create('course_module', function (Blueprint $table) { |
|
28 | $table->integer('course_id')->unsigned(); |
||
29 | $table->integer('module_id')->unsigned(); |
||
30 | $table->timestamps(); |
||
31 | $table->unique(['course_id', 'module_id']); |
||
32 | }); |
||
33 | } |
||
34 | /** |
||
45 |
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.