@@ -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'); |
@@ -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 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $user = \Auth::user(); |
| 19 | 19 | |
| 20 | 20 | // If user is not logged |
| 21 | - if (! $user) { |
|
| 21 | + if (!$user) { |
|
| 22 | 22 | return redirect('/')->with('message', 'You have not admin access'); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -21,12 +21,12 @@ discard block |
||
| 21 | 21 | $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); |
| 22 | 22 | $this->app['router']->aliasMiddleware('admin', \DavideCasiraghi\LaravelCards\Http\Middleware\Admin::class); |
| 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 | } |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | return view('laravel-cards::cards.index', compact('cards')) |
| 52 | - ->with('i', (request()->input('page', 1) - 1) * 20) |
|
| 53 | - ->with('searchKeywords', $searchKeywords) |
|
| 54 | - ->with('countriesAvailableForTranslations', $countriesAvailableForTranslations); |
|
| 52 | + ->with('i', (request()->input('page', 1) - 1) * 20) |
|
| 53 | + ->with('searchKeywords', $searchKeywords) |
|
| 54 | + ->with('countriesAvailableForTranslations', $countriesAvailableForTranslations); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /***************************************************************************/ |
@@ -206,27 +206,27 @@ discard block |
||
| 206 | 206 | public static function getButtonColorArray() |
| 207 | 207 | { |
| 208 | 208 | $ret = [ |
| 209 | - 'press-red' => 'Red', |
|
| 210 | - 'press-pink' => 'Pink', |
|
| 211 | - 'press-purple' => 'Purple', |
|
| 212 | - 'press-deeppurple' => 'Deep purple', |
|
| 213 | - 'press-indigo' => 'Indigo', |
|
| 214 | - 'press-blue' => 'Blue', |
|
| 215 | - 'press-lightblue' => 'Light blue', |
|
| 216 | - 'press-cyan' => 'Cyan', |
|
| 217 | - 'press-teal' => 'Teal', |
|
| 218 | - 'press-green' => 'Green', |
|
| 219 | - 'press-lightgreen' => 'Light green', |
|
| 220 | - 'press-lime' => 'Lime', |
|
| 221 | - 'press-yellow' => 'Yellow', |
|
| 222 | - 'press-amber' => 'Amber', |
|
| 223 | - 'press-orange' => 'Orange', |
|
| 224 | - 'press-deeporange' => 'Deeporange', |
|
| 225 | - 'press-brown' => 'Brown', |
|
| 226 | - 'press-grey' => 'Grey', |
|
| 227 | - 'press-bluegrey' => 'Blue grey', |
|
| 228 | - 'press-black' => 'Black', |
|
| 229 | - ]; |
|
| 209 | + 'press-red' => 'Red', |
|
| 210 | + 'press-pink' => 'Pink', |
|
| 211 | + 'press-purple' => 'Purple', |
|
| 212 | + 'press-deeppurple' => 'Deep purple', |
|
| 213 | + 'press-indigo' => 'Indigo', |
|
| 214 | + 'press-blue' => 'Blue', |
|
| 215 | + 'press-lightblue' => 'Light blue', |
|
| 216 | + 'press-cyan' => 'Cyan', |
|
| 217 | + 'press-teal' => 'Teal', |
|
| 218 | + 'press-green' => 'Green', |
|
| 219 | + 'press-lightgreen' => 'Light green', |
|
| 220 | + 'press-lime' => 'Lime', |
|
| 221 | + 'press-yellow' => 'Yellow', |
|
| 222 | + 'press-amber' => 'Amber', |
|
| 223 | + 'press-orange' => 'Orange', |
|
| 224 | + 'press-deeporange' => 'Deeporange', |
|
| 225 | + 'press-brown' => 'Brown', |
|
| 226 | + 'press-grey' => 'Grey', |
|
| 227 | + 'press-bluegrey' => 'Blue grey', |
|
| 228 | + 'press-black' => 'Black', |
|
| 229 | + ]; |
|
| 230 | 230 | |
| 231 | 231 | return $ret; |
| 232 | 232 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | // https://stackoverflow.com/questions/51611015/authuser-return-null-5-6 |
| 17 | 17 | public function __construct() |
| 18 | 18 | { |
| 19 | - $this->middleware(function ($request, $next) { |
|
| 19 | + $this->middleware(function($request, $next) { |
|
| 20 | 20 | $this->user = Auth::user(); |
| 21 | 21 | |
| 22 | 22 | return $next($request); |