Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function up() |
||
17 | { |
||
18 | Schema::create('loggable_changes', function(Blueprint $table) { |
||
19 | $table->increments('id'); |
||
20 | $table->unsignedInteger('user_id'); |
||
21 | $table->unsignedInteger('model_id'); |
||
22 | $table->string('model_type'); |
||
23 | $table->enum('type', ['create', 'update', 'delete', 'restore'])->default('update'); |
||
24 | $table->string('set', 32)->nullable(); |
||
25 | $table->string('attribute')->nullable(); |
||
26 | $table->text('old_value')->nullable(); |
||
27 | $table->text('new_value')->nullable(); |
||
28 | $table->timestamps(); |
||
29 | |||
30 | $table->index('user_id'); |
||
31 | $table->index('model_id'); |
||
32 | $table->index('type'); |
||
33 | $table->index('set'); |
||
34 | }); |
||
35 | } |
||
36 | |||
48 |
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.