@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - Route::group(['namespace' => 'DavideCasiraghi\LaravelCards\Http\Controllers', 'middleware' => 'web'], function () { |
|
| 3 | + Route::group(['namespace' => 'DavideCasiraghi\LaravelCards\Http\Controllers', 'middleware' => 'web'], function() { |
|
| 4 | 4 | |
| 5 | 5 | /* Cards */ |
| 6 | 6 | Route::resource('laravel-cards', 'CardController'); |
@@ -20,12 +20,12 @@ discard block |
||
| 20 | 20 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
| 21 | 21 | $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); |
| 22 | 22 | |
| 23 | - if (! class_exists('CreateCardsTable')) { |
|
| 23 | + if (!class_exists('CreateCardsTable')) { |
|
| 24 | 24 | $this->publishes([ |
| 25 | 25 | __DIR__.'/../database/migrations/create_cards_table.php.stub' => database_path('migrations/'.Carbon::now()->format('Y_m_d_Hmsu').'_create_cards_table.php'), |
| 26 | 26 | ], 'migrations'); |
| 27 | 27 | } |
| 28 | - if (! class_exists('CreateCardTranslationsTable')) { |
|
| 28 | + if (!class_exists('CreateCardTranslationsTable')) { |
|
| 29 | 29 | $this->publishes([ |
| 30 | 30 | __DIR__.'/../database/migrations/create_card_translations_table.php.stub' => database_path('migrations/'.Carbon::now()->format('Y_m_d_Hmsu').'_create_card_translations_table.php'), |
| 31 | 31 | ], 'migrations'); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'laravel-cards'); |
| 70 | 70 | |
| 71 | 71 | // Register the main class to use with the facade |
| 72 | - $this->app->singleton('laravel-cards', function () { |
|
| 72 | + $this->app->singleton('laravel-cards', function() { |
|
| 73 | 73 | return new LaravelCards; |
| 74 | 74 | }); |
| 75 | 75 | } |
@@ -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 | |
@@ -225,14 +225,14 @@ discard block |
||
| 225 | 225 | // - save file as jpg with medium quality |
| 226 | 226 | $image = Image::make($imageFile->getRealPath()) |
| 227 | 227 | ->resize((int) $imageWidth, null, |
| 228 | - function ($constraint) { |
|
| 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 | 234 | $image->resize((int) $thumbWidth, null, |
| 235 | - function ($constraint) { |
|
| 235 | + function($constraint) { |
|
| 236 | 236 | $constraint->aspectRatio(); |
| 237 | 237 | }) |
| 238 | 238 | ->save(storage_path($destinationPath.'thumb_'.$imageName), 75); |