@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | { |
215 | 215 | |
216 | 216 | // Create dir if not exist (in /storage/app/public/images/..) |
217 | - if (! \Storage::disk('public')->has('images/'.$imageSubdir.'/')) { |
|
217 | + if (!\Storage::disk('public')->has('images/'.$imageSubdir.'/')) { |
|
218 | 218 | \Storage::disk('public')->makeDirectory('images/'.$imageSubdir.'/'); |
219 | 219 | } |
220 | 220 | |
@@ -224,15 +224,15 @@ discard block |
||
224 | 224 | // - resize and store the image to a width of 300 and constrain aspect ratio (auto height) |
225 | 225 | // - save file as jpg with medium quality |
226 | 226 | $image = Image::make($imageFile->getRealPath()) |
227 | - ->resize((int)$imageWidth, null, |
|
228 | - function ($constraint) { |
|
227 | + ->resize((int) $imageWidth, null, |
|
228 | + function($constraint) { |
|
229 | 229 | $constraint->aspectRatio(); |
230 | 230 | }) |
231 | 231 | ->save(storage_path($destinationPath.$imageName), 75); |
232 | 232 | |
233 | 233 | // Create the thumb |
234 | - $image->resize((int)$thumbWidth, null, |
|
235 | - function ($constraint) { |
|
234 | + $image->resize((int) $thumbWidth, null, |
|
235 | + function($constraint) { |
|
236 | 236 | $constraint->aspectRatio(); |
237 | 237 | }) |
238 | 238 | ->save(storage_path($destinationPath.'thumb_'.$imageName), 75); |