Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Code Lines | 10 |
Lines | 28 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
14 | View Code Duplication | public function up() |
|
15 | { |
||
16 | Schema::create('enrollments', function (Blueprint $table) { |
||
17 | $table->increments('id'); //obligatori |
||
18 | $table->string('name'); //CAMP NO FORMA PART, només vull provar. |
||
19 | $table->boolean('validated'); //només les vàlides són actives. |
||
20 | $table->boolean('finished'); //indica si la matricula està finalitzada. |
||
21 | //$table->integer('period_id'); //De moment descartat //obligatori |
||
22 | $table->integer('classroom_id')->unsigned()->nullable(); //indica si la matricula està finalitzada. |
||
23 | $table->integer('study_id')->unsigned()->nullable(); |
||
24 | $table->integer('course_id')->unsigned()->nullable(); |
||
25 | $table->timestamps(); //timestamps |
||
26 | |||
27 | |||
28 | |||
29 | // $table->foreign('classroom_id')->references('id')->on('classrooms'); //indica si la matricula està finalitzada. |
||
30 | // $table->foreign('study_id')->references('id')->on('studies'); |
||
31 | // $table->foreign('course_id')->references('id')->on('courses'); |
||
32 | }); |
||
33 | |||
34 | // Schema::create('enrollment_user', function (Blueprint $table) { |
||
35 | // $table->integer('enrollment_id')->unsigned(); |
||
36 | // $table->integer('user_id')->unsigned(); |
||
37 | // $table->timestamps(); |
||
38 | // $table->unique(['enrollment_id', 'user_id']); |
||
39 | // }); |
||
40 | |||
41 | } |
||
42 | |||
53 |
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.