@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | use Translatable; |
13 | 13 | |
14 | - public $translatedAttributes = ['heading','title', 'body', 'button_text','image_alt']; |
|
14 | + public $translatedAttributes = ['heading', 'title', 'body', 'button_text', 'image_alt']; |
|
15 | 15 | protected $fillable = [ |
16 | 16 | 'image_file_name', |
17 | 17 | 'img_alignment', |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | return view('laravel-cards::cards.index', compact('cards')) |
44 | - ->with('i', (request()->input('page', 1) - 1) * 20) |
|
45 | - ->with('searchKeywords', $searchKeywords) |
|
46 | - ->with('countriesAvailableForTranslations', $countriesAvailableForTranslations); |
|
44 | + ->with('i', (request()->input('page', 1) - 1) * 20) |
|
45 | + ->with('searchKeywords', $searchKeywords) |
|
46 | + ->with('countriesAvailableForTranslations', $countriesAvailableForTranslations); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /***************************************************************************/ |
@@ -248,27 +248,27 @@ discard block |
||
248 | 248 | public static function getButtonColorArray() |
249 | 249 | { |
250 | 250 | $ret = [ |
251 | - 'press-red' => 'Red', |
|
252 | - 'press-pink' => 'Pink', |
|
253 | - 'press-purple' => 'Purple', |
|
254 | - 'press-deeppurple' => 'Deep purple', |
|
255 | - 'press-indigo' => 'Indigo', |
|
256 | - 'press-blue' => 'Blue', |
|
257 | - 'press-lightblue' => 'Light blue', |
|
258 | - 'press-cyan' => 'Cyan', |
|
259 | - 'press-teal' => 'Teal', |
|
260 | - 'press-green' => 'Green', |
|
261 | - 'press-lightgreen' => 'Light green', |
|
262 | - 'press-lime' => 'Lime', |
|
263 | - 'press-yellow' => 'Yellow', |
|
264 | - 'press-amber' => 'Amber', |
|
265 | - 'press-orange' => 'Orange', |
|
266 | - 'press-deeporange' => 'Deeporange', |
|
267 | - 'press-brown' => 'Brown', |
|
268 | - 'press-grey' => 'Grey', |
|
269 | - 'press-bluegrey' => 'Blue grey', |
|
270 | - 'press-black' => 'Black', |
|
271 | - ]; |
|
251 | + 'press-red' => 'Red', |
|
252 | + 'press-pink' => 'Pink', |
|
253 | + 'press-purple' => 'Purple', |
|
254 | + 'press-deeppurple' => 'Deep purple', |
|
255 | + 'press-indigo' => 'Indigo', |
|
256 | + 'press-blue' => 'Blue', |
|
257 | + 'press-lightblue' => 'Light blue', |
|
258 | + 'press-cyan' => 'Cyan', |
|
259 | + 'press-teal' => 'Teal', |
|
260 | + 'press-green' => 'Green', |
|
261 | + 'press-lightgreen' => 'Light green', |
|
262 | + 'press-lime' => 'Lime', |
|
263 | + 'press-yellow' => 'Yellow', |
|
264 | + 'press-amber' => 'Amber', |
|
265 | + 'press-orange' => 'Orange', |
|
266 | + 'press-deeporange' => 'Deeporange', |
|
267 | + 'press-brown' => 'Brown', |
|
268 | + 'press-grey' => 'Grey', |
|
269 | + 'press-bluegrey' => 'Blue grey', |
|
270 | + 'press-black' => 'Black', |
|
271 | + ]; |
|
272 | 272 | |
273 | 273 | return $ret; |
274 | 274 | } |
@@ -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($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($thumbWidth, null, |
235 | - function ($constraint) { |
|
235 | + function($constraint) { |
|
236 | 236 | $constraint->aspectRatio(); |
237 | 237 | }) |
238 | 238 | ->save(storage_path($destinationPath.'thumb_'.$imageName), 75); |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); |
22 | 22 | |
23 | 23 | |
24 | - if (! class_exists('CreateCardsTable')) { |
|
24 | + if (!class_exists('CreateCardsTable')) { |
|
25 | 25 | $this->publishes([ |
26 | 26 | __DIR__.'/../database/migrations/create_cards_table.php.stub' => database_path('migrations/'.Carbon::now()->format('Y_m_d_Hmsu').'_create_cards_table.php'), |
27 | 27 | ], 'migrations'); |
28 | 28 | } |
29 | - if (! class_exists('CreateCardTranslationsTable')) { |
|
29 | + if (!class_exists('CreateCardTranslationsTable')) { |
|
30 | 30 | $this->publishes([ |
31 | 31 | __DIR__.'/../database/migrations/create_card_translations_table.php.stub' => database_path('migrations/'.Carbon::now()->format('Y_m_d_Hmsu').'_create_card_translations_table.php'), |
32 | 32 | ], 'migrations'); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'laravel-cards'); |
71 | 71 | |
72 | 72 | // Register the main class to use with the facade |
73 | - $this->app->singleton('laravel-cards', function () { |
|
73 | + $this->app->singleton('laravel-cards', function() { |
|
74 | 74 | return new LaravelCards; |
75 | 75 | }); |
76 | 76 | } |
@@ -127,23 +127,23 @@ |
||
127 | 127 | public static function getParametersArray($card) |
128 | 128 | { |
129 | 129 | $ret = [ |
130 | - 'img_col_size_class' => 'col-md-'.$card->img_col_size, |
|
131 | - 'text_col_size_class' => 'col-md-'.(12-$card->img_col_size), |
|
132 | - 'bkg_color' => 'background-color: '.$card->bkg_color.';', |
|
133 | - 'text_color' => 'color: '.$card->text_color.';', |
|
134 | - 'container_wrap' => ($card->container_wrap == 'true') ? 1 : 0, |
|
135 | - ]; |
|
130 | + 'img_col_size_class' => 'col-md-'.$card->img_col_size, |
|
131 | + 'text_col_size_class' => 'col-md-'.(12-$card->img_col_size), |
|
132 | + 'bkg_color' => 'background-color: '.$card->bkg_color.';', |
|
133 | + 'text_color' => 'color: '.$card->text_color.';', |
|
134 | + 'container_wrap' => ($card->container_wrap == 'true') ? 1 : 0, |
|
135 | + ]; |
|
136 | 136 | |
137 | 137 | switch ($card->img_alignment) { |
138 | - case 'left': |
|
138 | + case 'left': |
|
139 | 139 | $ret['img_col_order_class'] = 'order-md-1'; |
140 | - $ret['text_col_order_class'] = 'order-md-2'; |
|
141 | - break; |
|
142 | - case 'right': |
|
140 | + $ret['text_col_order_class'] = 'order-md-2'; |
|
141 | + break; |
|
142 | + case 'right': |
|
143 | 143 | $ret['img_col_order_class'] = 'order-md-2'; |
144 | - $ret['text_col_order_class'] = 'order-md-1'; |
|
145 | - break; |
|
146 | - } |
|
144 | + $ret['text_col_order_class'] = 'order-md-1'; |
|
145 | + break; |
|
146 | + } |
|
147 | 147 | |
148 | 148 | return $ret; |
149 | 149 | } |
@@ -128,7 +128,7 @@ |
||
128 | 128 | { |
129 | 129 | $ret = [ |
130 | 130 | 'img_col_size_class' => 'col-md-'.$card->img_col_size, |
131 | - 'text_col_size_class' => 'col-md-'.(12-$card->img_col_size), |
|
131 | + 'text_col_size_class' => 'col-md-'.(12 - $card->img_col_size), |
|
132 | 132 | 'bkg_color' => 'background-color: '.$card->bkg_color.';', |
133 | 133 | 'text_color' => 'color: '.$card->text_color.';', |
134 | 134 | 'container_wrap' => ($card->container_wrap == 'true') ? 1 : 0, |
@@ -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'); |