@@ -32,8 +32,7 @@ discard block |
||
32 | 32 | $table->string("{$name}_file_dominant_color", 7)->nullable(); |
33 | 33 | $table->string("{$name}_file_format", 85)->nullable(); |
34 | 34 | $table->string("{$name}_file_cover", 85)->nullable(); |
35 | - } |
|
36 | - else { |
|
35 | + } else { |
|
37 | 36 | $table->{self::jsonColumnType()}("{$name}_file_meta")->nullable(); |
38 | 37 | } |
39 | 38 | } |
@@ -65,8 +64,7 @@ discard block |
||
65 | 64 | $table->dropIndex("{$tableName}_{$name}_file_size_index"); |
66 | 65 | $table->dropIndex("{$tableName}_{$name}_file_type_index"); |
67 | 66 | $table->dropIndex("{$tableName}_{$name}_file_duration_index"); |
68 | - } |
|
69 | - else { |
|
67 | + } else { |
|
70 | 68 | $columns[] = "{$name}_file_meta"; |
71 | 69 | } |
72 | 70 |
@@ -32,22 +32,19 @@ |
||
32 | 32 | 'Width is required when you are in SCALE_HEIGHT mode' |
33 | 33 | ); |
34 | 34 | } |
35 | - } |
|
36 | - else if ($this->mode === LaruploadMediaStyle::SCALE_WIDTH) { |
|
35 | + } else if ($this->mode === LaruploadMediaStyle::SCALE_WIDTH) { |
|
37 | 36 | if ($this->height === null or $this->height === 0) { |
38 | 37 | throw new Exception( |
39 | 38 | 'Height is required when you are in SCALE_WIDTH mode' |
40 | 39 | ); |
41 | 40 | } |
42 | - } |
|
43 | - else if (in_array($this->mode, [LaruploadMediaStyle::CROP, LaruploadMediaStyle::FIT])) { |
|
41 | + } else if (in_array($this->mode, [LaruploadMediaStyle::CROP, LaruploadMediaStyle::FIT])) { |
|
44 | 42 | if (!$this->width or !$this->height) { |
45 | 43 | throw new Exception( |
46 | 44 | 'Width and Height are required when you are in CROP/FIT mode' |
47 | 45 | ); |
48 | 46 | } |
49 | - } |
|
50 | - else if ($this->mode === LaruploadMediaStyle::AUTO) { |
|
47 | + } else if ($this->mode === LaruploadMediaStyle::AUTO) { |
|
51 | 48 | if (!$this->width and !$this->height) { |
52 | 49 | throw new Exception( |
53 | 50 | 'Width and height are required when you are in auto mode' |