@@ -15,6 +15,6 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * Frontend root |
| 17 | 17 | */ |
| 18 | -Route::get('/', ['as' => 'root', function () { |
|
| 18 | +Route::get('/', [ 'as' => 'root', function() { |
|
| 19 | 19 | return view('welcome'); |
| 20 | -}]); |
|
| 20 | +} ]); |
|
@@ -28,13 +28,13 @@ |
||
| 28 | 28 | public function handle($request, Closure $next) |
| 29 | 29 | { |
| 30 | 30 | |
| 31 | - if($request->has('published')){ |
|
| 31 | + if ($request->has('published')) { |
|
| 32 | 32 | |
| 33 | - $request->merge(['published_at' => \Carbon\Carbon::now()]); |
|
| 33 | + $request->merge([ 'published_at' => \Carbon\Carbon::now() ]); |
|
| 34 | 34 | } |
| 35 | - else{ |
|
| 35 | + else { |
|
| 36 | 36 | |
| 37 | - $request->merge(['published_at' => NULL]); |
|
| 37 | + $request->merge([ 'published_at' => NULL ]); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | return $next($request); |
@@ -30,15 +30,15 @@ |
||
| 30 | 30 | public function handle($request, Closure $next) |
| 31 | 31 | { |
| 32 | 32 | $intArgs = func_num_args(); |
| 33 | - for($a = 2; $a < $intArgs; $a++){ |
|
| 33 | + for ($a = 2; $a < $intArgs; $a++) { |
|
| 34 | 34 | |
| 35 | 35 | $model = func_get_arg($a); |
| 36 | - $modelWithNamespace = 'App\\'.$model; |
|
| 36 | + $modelWithNamespace = 'App\\' . $model; |
|
| 37 | 37 | |
| 38 | 38 | |
| 39 | - $array = ['other_tables' => |
|
| 39 | + $array = [ 'other_tables' => |
|
| 40 | 40 | [ |
| 41 | - $model => $modelWithNamespace::orderBy('id', 'desc')->get(['id', 'name', 'url', 'image_extension']) |
|
| 41 | + $model => $modelWithNamespace::orderBy('id', 'desc')->get([ 'id', 'name', 'url', 'image_extension' ]) |
|
| 42 | 42 | ] |
| 43 | 43 | ]; |
| 44 | 44 | |
@@ -31,12 +31,12 @@ |
||
| 31 | 31 | * Get lookup table data and insert into request |
| 32 | 32 | */ |
| 33 | 33 | $intArgs = func_num_args(); |
| 34 | - for($a = 2; $a < $intArgs; $a++){ |
|
| 34 | + for ($a = 2; $a < $intArgs; $a++) { |
|
| 35 | 35 | |
| 36 | 36 | $model = func_get_arg($a); |
| 37 | - $modelWithNamespace = 'App\\'.$model; |
|
| 37 | + $modelWithNamespace = 'App\\' . $model; |
|
| 38 | 38 | |
| 39 | - $request->merge([$model => $modelWithNamespace::orderBy('name', 'asc')->get()]); |
|
| 39 | + $request->merge([ $model => $modelWithNamespace::orderBy('name', 'asc')->get() ]); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | return $next($request); |
@@ -15,14 +15,14 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * Root |
| 17 | 17 | */ |
| 18 | -Route::get('/', ['as' => 'root', function () { |
|
| 18 | +Route::get('/', [ 'as' => 'root', function() { |
|
| 19 | 19 | return view('welcome'); |
| 20 | -}]); |
|
| 20 | +} ]); |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * Admin |
| 24 | 24 | */ |
| 25 | -Route::group(['prefix' => env('APP_ADMIN_URL', 'admin'), 'as' => 'admin.', 'middleware' => 'auth'], function () { |
|
| 25 | +Route::group([ 'prefix' => env('APP_ADMIN_URL', 'admin'), 'as' => 'admin.', 'middleware' => 'auth' ], function() { |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Main dashboard |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | /** |
| 35 | 35 | * Articles and categories |
| 36 | 36 | */ |
| 37 | - Route::resource('page', 'Admin\PageController', ['names' => [ |
|
| 37 | + Route::resource('page', 'Admin\PageController', [ 'names' => [ |
|
| 38 | 38 | 'index' => 'page.index', |
| 39 | 39 | 'create' => 'page.create', |
| 40 | 40 | 'store' => 'page.store', |
@@ -42,8 +42,8 @@ discard block |
||
| 42 | 42 | 'edit' => 'page.edit', |
| 43 | 43 | 'update' => 'page.update', |
| 44 | 44 | 'destroy' => 'page.destroy' |
| 45 | - ]]); |
|
| 46 | - Route::resource('pageCategory', 'Admin\PageCategoryController', ['names' => [ |
|
| 45 | + ] ]); |
|
| 46 | + Route::resource('pageCategory', 'Admin\PageCategoryController', [ 'names' => [ |
|
| 47 | 47 | 'index' => 'pageCategory.index', |
| 48 | 48 | 'create' => 'pageCategory.create', |
| 49 | 49 | 'store' => 'pageCategory.store', |
@@ -51,12 +51,12 @@ discard block |
||
| 51 | 51 | 'edit' => 'pageCategory.edit', |
| 52 | 52 | 'update' => 'pageCategory.update', |
| 53 | 53 | 'destroy' => 'pageCategory.destroy' |
| 54 | - ]]); |
|
| 54 | + ] ]); |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Articles and categories |
| 58 | 58 | */ |
| 59 | - Route::resource('article', 'Admin\ArticleController', ['names' => [ |
|
| 59 | + Route::resource('article', 'Admin\ArticleController', [ 'names' => [ |
|
| 60 | 60 | 'index' => 'article.index', |
| 61 | 61 | 'create' => 'article.create', |
| 62 | 62 | 'store' => 'article.store', |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | 'edit' => 'article.edit', |
| 65 | 65 | 'update' => 'article.update', |
| 66 | 66 | 'destroy' => 'article.destroy' |
| 67 | - ]]); |
|
| 68 | - Route::resource('articleCategory', 'Admin\ArticleCategoryController', ['names' => [ |
|
| 67 | + ] ]); |
|
| 68 | + Route::resource('articleCategory', 'Admin\ArticleCategoryController', [ 'names' => [ |
|
| 69 | 69 | 'index' => 'articleCategory.index', |
| 70 | 70 | 'create' => 'articleCategory.create', |
| 71 | 71 | 'store' => 'articleCategory.store', |
@@ -73,12 +73,12 @@ discard block |
||
| 73 | 73 | 'edit' => 'articleCategory.edit', |
| 74 | 74 | 'update' => 'articleCategory.update', |
| 75 | 75 | 'destroy' => 'articleCategory.destroy' |
| 76 | - ]]); |
|
| 76 | + ] ]); |
|
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * Feedback |
| 80 | 80 | */ |
| 81 | - Route::resource('feedback', 'Admin\FeedbackController', ['names' => [ |
|
| 81 | + Route::resource('feedback', 'Admin\FeedbackController', [ 'names' => [ |
|
| 82 | 82 | 'index' => 'feedback.index', |
| 83 | 83 | 'create' => 'feedback.create', |
| 84 | 84 | 'store' => 'feedback.store', |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | 'edit' => 'feedback.edit', |
| 87 | 87 | 'update' => 'feedback.update', |
| 88 | 88 | 'destroy' => 'feedback.destroy' |
| 89 | - ]]); |
|
| 89 | + ] ]); |
|
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | 92 | * Comment |
| 93 | 93 | */ |
| 94 | - Route::resource('comment', 'Admin\CommentController', ['names' => [ |
|
| 94 | + Route::resource('comment', 'Admin\CommentController', [ 'names' => [ |
|
| 95 | 95 | 'index' => 'comment.index', |
| 96 | 96 | 'create' => 'comment.create', |
| 97 | 97 | 'store' => 'comment.store', |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | 'edit' => 'comment.edit', |
| 100 | 100 | 'update' => 'comment.update', |
| 101 | 101 | 'destroy' => 'comment.destroy' |
| 102 | - ]]); |
|
| 102 | + ] ]); |
|
| 103 | 103 | Route::get('comment/{id}/approve', [ |
| 104 | 104 | 'as' => 'comment.approve', 'uses' => 'Admin\CommentController@approve' |
| 105 | 105 | ]); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | /** |
| 111 | 111 | * Sliders and slides |
| 112 | 112 | */ |
| 113 | - Route::resource('slider', 'Admin\SliderController', ['names' => [ |
|
| 113 | + Route::resource('slider', 'Admin\SliderController', [ 'names' => [ |
|
| 114 | 114 | 'index' => 'slider.index', |
| 115 | 115 | 'create' => 'slider.create', |
| 116 | 116 | 'store' => 'slider.store', |
@@ -118,8 +118,8 @@ discard block |
||
| 118 | 118 | 'edit' => 'slider.edit', |
| 119 | 119 | 'update' => 'slider.update', |
| 120 | 120 | 'destroy' => 'slider.destroy' |
| 121 | - ]]); |
|
| 122 | - Route::resource('slide', 'Admin\SlideController', ['names' => [ |
|
| 121 | + ] ]); |
|
| 122 | + Route::resource('slide', 'Admin\SlideController', [ 'names' => [ |
|
| 123 | 123 | 'index' => 'slide.index', |
| 124 | 124 | 'create' => 'slide.create', |
| 125 | 125 | 'store' => 'slide.store', |
@@ -127,12 +127,12 @@ discard block |
||
| 127 | 127 | 'edit' => 'slide.edit', |
| 128 | 128 | 'update' => 'slide.update', |
| 129 | 129 | 'destroy' => 'slide.destroy' |
| 130 | - ]]); |
|
| 130 | + ] ]); |
|
| 131 | 131 | |
| 132 | 132 | /** |
| 133 | 133 | * Images and categories |
| 134 | 134 | */ |
| 135 | - Route::resource('image', 'Admin\ImageController', ['middleware' => ['media.addparameters'], |
|
| 135 | + Route::resource('image', 'Admin\ImageController', [ 'middleware' => [ 'media.addparameters' ], |
|
| 136 | 136 | 'names' => [ |
| 137 | 137 | 'index' => 'image.index', |
| 138 | 138 | 'create' => 'image.create', |
@@ -141,8 +141,8 @@ discard block |
||
| 141 | 141 | 'edit' => 'image.edit', |
| 142 | 142 | 'update' => 'image.update', |
| 143 | 143 | 'destroy' => 'image.destroy' |
| 144 | - ]]); |
|
| 145 | - Route::resource('imageCategory', 'Admin\ImageCategoryController', ['names' => [ |
|
| 144 | + ] ]); |
|
| 145 | + Route::resource('imageCategory', 'Admin\ImageCategoryController', [ 'names' => [ |
|
| 146 | 146 | 'index' => 'imageCategory.index', |
| 147 | 147 | 'create' => 'imageCategory.create', |
| 148 | 148 | 'store' => 'imageCategory.store', |
@@ -150,12 +150,12 @@ discard block |
||
| 150 | 150 | 'edit' => 'imageCategory.edit', |
| 151 | 151 | 'update' => 'imageCategory.update', |
| 152 | 152 | 'destroy' => 'imageCategory.destroy' |
| 153 | - ]]); |
|
| 153 | + ] ]); |
|
| 154 | 154 | |
| 155 | 155 | /** |
| 156 | 156 | * Advertising |
| 157 | 157 | */ |
| 158 | - Route::resource('advert', 'Admin\AdvertController', ['names' => [ |
|
| 158 | + Route::resource('advert', 'Admin\AdvertController', [ 'names' => [ |
|
| 159 | 159 | 'index' => 'advert.index', |
| 160 | 160 | 'create' => 'advert.create', |
| 161 | 161 | 'store' => 'advert.store', |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | 'edit' => 'advert.edit', |
| 164 | 164 | 'update' => 'advert.update', |
| 165 | 165 | 'destroy' => 'advert.destroy' |
| 166 | - ]]); |
|
| 167 | - Route::resource('advertLocation', 'Admin\AdvertLocationController', ['names' => [ |
|
| 166 | + ] ]); |
|
| 167 | + Route::resource('advertLocation', 'Admin\AdvertLocationController', [ 'names' => [ |
|
| 168 | 168 | 'index' => 'advertLocation.index', |
| 169 | 169 | 'create' => 'advertLocation.create', |
| 170 | 170 | 'store' => 'advertLocation.store', |
@@ -172,12 +172,12 @@ discard block |
||
| 172 | 172 | 'edit' => 'advertLocation.edit', |
| 173 | 173 | 'update' => 'advertLocation.update', |
| 174 | 174 | 'destroy' => 'advertLocation.destroy' |
| 175 | - ]]); |
|
| 175 | + ] ]); |
|
| 176 | 176 | |
| 177 | 177 | /** |
| 178 | 178 | * Products and categories |
| 179 | 179 | */ |
| 180 | - Route::resource('productCategory', 'Admin\ProductCategoryController', ['names' => [ |
|
| 180 | + Route::resource('productCategory', 'Admin\ProductCategoryController', [ 'names' => [ |
|
| 181 | 181 | 'index' => 'productCategory.index', |
| 182 | 182 | 'create' => 'productCategory.create', |
| 183 | 183 | 'store' => 'productCategory.store', |
@@ -185,8 +185,8 @@ discard block |
||
| 185 | 185 | 'edit' => 'productCategory.edit', |
| 186 | 186 | 'update' => 'productCategory.update', |
| 187 | 187 | 'destroy' => 'productCategory.destroy' |
| 188 | - ]]); |
|
| 189 | - Route::resource('product', 'Admin\ProductController', ['names' => [ |
|
| 188 | + ] ]); |
|
| 189 | + Route::resource('product', 'Admin\ProductController', [ 'names' => [ |
|
| 190 | 190 | 'index' => 'product.index', |
| 191 | 191 | 'create' => 'product.create', |
| 192 | 192 | 'store' => 'product.store', |
@@ -194,13 +194,13 @@ discard block |
||
| 194 | 194 | 'edit' => 'product.edit', |
| 195 | 195 | 'update' => 'product.update', |
| 196 | 196 | 'destroy' => 'product.destroy' |
| 197 | - ]]); |
|
| 197 | + ] ]); |
|
| 198 | 198 | |
| 199 | 199 | /** |
| 200 | 200 | * Settings |
| 201 | 201 | */ |
| 202 | 202 | Route::resource('settings', 'Admin\SettingsController', [ |
| 203 | - 'except' => ['delete', 'show'], |
|
| 203 | + 'except' => [ 'delete', 'show' ], |
|
| 204 | 204 | 'names' => [ |
| 205 | 205 | 'index' => 'settings.index', |
| 206 | 206 | 'create' => 'settings.create', |
@@ -209,13 +209,13 @@ discard block |
||
| 209 | 209 | 'edit' => 'settings.edit', |
| 210 | 210 | 'update' => 'settings.update', |
| 211 | 211 | 'destroy' => 'settings.destroy' |
| 212 | - ]]); |
|
| 212 | + ] ]); |
|
| 213 | 213 | |
| 214 | 214 | /** |
| 215 | 215 | * Users |
| 216 | 216 | */ |
| 217 | 217 | Route::resource('user', 'Admin\UserController', [ |
| 218 | - 'except' => ['show'], |
|
| 218 | + 'except' => [ 'show' ], |
|
| 219 | 219 | 'names' => [ |
| 220 | 220 | 'index' => 'user.index', |
| 221 | 221 | 'create' => 'user.create', |
@@ -224,14 +224,14 @@ discard block |
||
| 224 | 224 | 'edit' => 'user.edit', |
| 225 | 225 | 'update' => 'user.update', |
| 226 | 226 | 'destroy' => 'user.destroy' |
| 227 | - ]]); |
|
| 227 | + ] ]); |
|
| 228 | 228 | |
| 229 | 229 | }); |
| 230 | 230 | |
| 231 | 231 | /** |
| 232 | 232 | * Authentication |
| 233 | 233 | */ |
| 234 | -Route::group(['prefix' => 'auth'], function () { |
|
| 234 | +Route::group([ 'prefix' => 'auth' ], function() { |
|
| 235 | 235 | |
| 236 | 236 | Route::get('login', [ |
| 237 | 237 | 'as' => 'authGetLogin', 'uses' => 'Auth\AuthController@getLogin' |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | /** |
| 260 | 260 | * Images |
| 261 | 261 | */ |
| 262 | -Route::get('/' . env('APP_IMAGE_URL', 'images').'/{imageName}.{imageExtension}', [ |
|
| 262 | +Route::get('/' . env('APP_IMAGE_URL', 'images') . '/{imageName}.{imageExtension}', [ |
|
| 263 | 263 | 'as' => 'getImage', 'uses' => 'Media\ImageController@getImage' |
| 264 | 264 | ]); |
| 265 | 265 | |
@@ -44,16 +44,16 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | if (is_numeric($fieldName) == TRUE) { |
| 46 | 46 | $fieldName = $fieldAttributes; |
| 47 | - $fieldAttributes = ['operator' => '=', 'prefix' => '', 'sufix' => '']; |
|
| 47 | + $fieldAttributes = [ 'operator' => '=', 'prefix' => '', 'sufix' => '' ]; |
|
| 48 | 48 | } |
| 49 | - if (isset($fieldAttributes['operator']) == FALSE) { |
|
| 50 | - $fieldAttributes['operator'] = '='; |
|
| 49 | + if (isset($fieldAttributes[ 'operator' ]) == FALSE) { |
|
| 50 | + $fieldAttributes[ 'operator' ] = '='; |
|
| 51 | 51 | } |
| 52 | - if (isset($fieldAttributes['prefix']) == FALSE) { |
|
| 53 | - $fieldAttributes['prefix'] = ''; |
|
| 52 | + if (isset($fieldAttributes[ 'prefix' ]) == FALSE) { |
|
| 53 | + $fieldAttributes[ 'prefix' ] = ''; |
|
| 54 | 54 | } |
| 55 | - if (isset($fieldAttributes['sufix']) == FALSE) { |
|
| 56 | - $fieldAttributes['sufix'] = ''; |
|
| 55 | + if (isset($fieldAttributes[ 'sufix' ]) == FALSE) { |
|
| 56 | + $fieldAttributes[ 'sufix' ] = ''; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -61,13 +61,13 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | if ($first == TRUE) { |
| 63 | 63 | |
| 64 | - $query->where($fieldName, $fieldAttributes['operator'], $fieldAttributes['prefix'] . $word |
|
| 65 | - . $fieldAttributes['sufix']); |
|
| 64 | + $query->where($fieldName, $fieldAttributes[ 'operator' ], $fieldAttributes[ 'prefix' ] . $word |
|
| 65 | + . $fieldAttributes[ 'sufix' ]); |
|
| 66 | 66 | |
| 67 | 67 | $first = FALSE; |
| 68 | 68 | } else { |
| 69 | - $query->orWhere($fieldName, $fieldAttributes['operator'], $fieldAttributes['prefix'] . $word |
|
| 70 | - . $fieldAttributes['sufix']); |
|
| 69 | + $query->orWhere($fieldName, $fieldAttributes[ 'operator' ], $fieldAttributes[ 'prefix' ] . $word |
|
| 70 | + . $fieldAttributes[ 'sufix' ]); |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @param array $possibleParameters |
| 105 | 105 | * @return boolean |
| 106 | 106 | */ |
| 107 | - public static function resetSaveIndexParameters($module, $possibleParameters = ['search', 'orderbycolumn', 'orderbytype', 'relation']) |
|
| 107 | + public static function resetSaveIndexParameters($module, $possibleParameters = [ 'search', 'orderbycolumn', 'orderbytype', 'relation' ]) |
|
| 108 | 108 | { |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | foreach ($allParameters as $parameter => $value) { |
| 119 | 119 | |
| 120 | - $cacheKey = implode('.', [$module, Auth::user()->id, $parameter]); |
|
| 120 | + $cacheKey = implode('.', [ $module, Auth::user()->id, $parameter ]); |
|
| 121 | 121 | |
| 122 | 122 | /** |
| 123 | 123 | * Reset |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | if (empty($value) == TRUE) { |
| 126 | 126 | |
| 127 | 127 | Cache::forget($cacheKey); |
| 128 | - unset($allParameters[$parameter]); |
|
| 128 | + unset($allParameters[ $parameter ]); |
|
| 129 | 129 | } /** |
| 130 | 130 | * Save |
| 131 | 131 | */ else { |
@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | foreach ($possibleParameters as $parameter => $value) { |
| 141 | 141 | |
| 142 | - $cacheKey = implode('.', [$module, Auth::user()->id, $value]); |
|
| 142 | + $cacheKey = implode('.', [ $module, Auth::user()->id, $value ]); |
|
| 143 | 143 | |
| 144 | - $allParameters[$value] = Cache::get($cacheKey); |
|
| 144 | + $allParameters[ $value ] = Cache::get($cacheKey); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | if (preg_match('/content: \$fa-var-(.*)\;/', $row, $matches) == TRUE) { |
| 251 | 251 | |
| 252 | - $icons[] = "fa-" . $matches[1]; |
|
| 252 | + $icons[ ] = "fa-" . $matches[ 1 ]; |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | } |
@@ -33,21 +33,21 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @var array |
| 35 | 35 | */ |
| 36 | - protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
|
| 36 | + protected $dates = [ 'created_at', 'updated_at', 'deleted_at' ]; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * The attributes that are mass assignable. |
| 40 | 40 | * |
| 41 | 41 | * @var array |
| 42 | 42 | */ |
| 43 | - protected $fillable = ['name', 'description', 'color']; |
|
| 43 | + protected $fillable = [ 'name', 'description', 'color' ]; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Columns to exclude from index |
| 47 | 47 | * |
| 48 | 48 | * @var array |
| 49 | 49 | */ |
| 50 | - protected $excludedFromIndex = []; |
|
| 50 | + protected $excludedFromIndex = [ ]; |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Fields to search in fulltext mode |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | * |
| 83 | 83 | * @return object |
| 84 | 84 | */ |
| 85 | - public function adverts(){ |
|
| 85 | + public function adverts() { |
|
| 86 | 86 | |
| 87 | 87 | return $this->belongsToMany('App\Advert', 'advert_advertlocation', 'advert_id', 'advertlocation_id'); |
| 88 | 88 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * @param type $query |
| 94 | 94 | * @return object |
| 95 | 95 | */ |
| 96 | - public function scopeRelationships($query){ |
|
| 96 | + public function scopeRelationships($query) { |
|
| 97 | 97 | |
| 98 | 98 | return $query->with('adverts'); |
| 99 | 99 | } |
@@ -32,21 +32,21 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @var array |
| 34 | 34 | */ |
| 35 | - protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
|
| 35 | + protected $dates = [ 'created_at', 'updated_at', 'deleted_at' ]; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * The attributes that are mass assignable. |
| 39 | 39 | * |
| 40 | 40 | * @var array |
| 41 | 41 | */ |
| 42 | - protected $fillable = ['name', 'description', 'class']; |
|
| 42 | + protected $fillable = [ 'name', 'description', 'class' ]; |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * Columns to exclude from index |
| 46 | 46 | * |
| 47 | 47 | * @var array |
| 48 | 48 | */ |
| 49 | - protected $excludedFromIndex = []; |
|
| 49 | + protected $excludedFromIndex = [ ]; |
|
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | 52 | * Fields to search in fulltext mode |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * @return object |
| 88 | 88 | */ |
| 89 | - public function pages(){ |
|
| 89 | + public function pages() { |
|
| 90 | 90 | |
| 91 | 91 | return $this->belongsToMany('App\Page', 'page_pagecategory', 'page_id', 'pagecategory_id'); |
| 92 | 92 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * @param query $query |
| 98 | 98 | * @return query |
| 99 | 99 | */ |
| 100 | - public function scopeRelationships($query){ |
|
| 100 | + public function scopeRelationships($query) { |
|
| 101 | 101 | |
| 102 | 102 | return $query->with('pages'); |
| 103 | 103 | } |
@@ -33,21 +33,21 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @var array |
| 35 | 35 | */ |
| 36 | - protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
|
| 36 | + protected $dates = [ 'created_at', 'updated_at', 'deleted_at' ]; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * The attributes that are mass assignable. |
| 40 | 40 | * |
| 41 | 41 | * @var array |
| 42 | 42 | */ |
| 43 | - protected $fillable = ['name', 'description', 'position', 'image_id']; |
|
| 43 | + protected $fillable = [ 'name', 'description', 'position', 'image_id' ]; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Columns to exclude from index |
| 47 | 47 | * |
| 48 | 48 | * @var array |
| 49 | 49 | */ |
| 50 | - protected $excludedFromIndex = ['image']; |
|
| 50 | + protected $excludedFromIndex = [ 'image' ]; |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Fields to search in fulltext mode |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return object |
| 85 | 85 | */ |
| 86 | - public function images(){ |
|
| 86 | + public function images() { |
|
| 87 | 87 | |
| 88 | 88 | return $this->belongsTo('App\Image', 'image_id')->select('id', 'name', 'description', |
| 89 | 89 | 'alt', 'url', 'imagecategory_id', 'image_mime_type', 'image_extension', |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * @param query $query |
| 98 | 98 | * @return query |
| 99 | 99 | */ |
| 100 | - public function scopeRelationships($query){ |
|
| 100 | + public function scopeRelationships($query) { |
|
| 101 | 101 | |
| 102 | 102 | return $query->with('images', 'images.imagecategories'); |
| 103 | 103 | } |