@@ -31,25 +31,25 @@ |
||
| 31 | 31 | $this->middleware('guest'); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - public function prePostEmail(Request $request){ |
|
| 34 | + public function prePostEmail(Request $request) { |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Add recaptcha |
| 38 | 38 | */ |
| 39 | - if(env('RECAPTCHA_ENABLED') == 1){ |
|
| 40 | - $this->validate($request, ['g-recaptcha-response' => 'required|recaptcha']); |
|
| 39 | + if (env('RECAPTCHA_ENABLED') == 1) { |
|
| 40 | + $this->validate($request, [ 'g-recaptcha-response' => 'required|recaptcha' ]); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return $this->postEmail($request); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - public function prePostReset(Request $request){ |
|
| 46 | + public function prePostReset(Request $request) { |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Add recaptcha |
| 50 | 50 | */ |
| 51 | - if(env('RECAPTCHA_ENABLED') == 1){ |
|
| 52 | - $this->validate($request, ['g-recaptcha-response' => 'required|recaptcha']); |
|
| 51 | + if (env('RECAPTCHA_ENABLED') == 1) { |
|
| 52 | + $this->validate($request, [ 'g-recaptcha-response' => 'required|recaptcha' ]); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return $this->postReset($request); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | public function __construct() |
| 40 | 40 | { |
| 41 | 41 | $this->redirectAfterLogout = env('APP_ADMIN_URL', 'admin'); |
| 42 | - $this->middleware('guest', ['except' => 'getLogout']); |
|
| 42 | + $this->middleware('guest', [ 'except' => 'getLogout' ]); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -66,9 +66,9 @@ discard block |
||
| 66 | 66 | protected function create(array $data) |
| 67 | 67 | { |
| 68 | 68 | return User::create([ |
| 69 | - 'name' => $data['name'], |
|
| 70 | - 'email' => $data['email'], |
|
| 71 | - 'password' => bcrypt($data['password']), |
|
| 69 | + 'name' => $data[ 'name' ], |
|
| 70 | + 'email' => $data[ 'email' ], |
|
| 71 | + 'password' => bcrypt($data[ 'password' ]), |
|
| 72 | 72 | ]); |
| 73 | 73 | } |
| 74 | 74 | |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | /** |
| 78 | 78 | * Add recaptcha |
| 79 | 79 | */ |
| 80 | - if(env('RECAPTCHA_ENABLED') == 1){ |
|
| 81 | - $this->validate($request, ['g-recaptcha-response' => 'required|recaptcha']); |
|
| 80 | + if (env('RECAPTCHA_ENABLED') == 1) { |
|
| 81 | + $this->validate($request, [ 'g-recaptcha-response' => 'required|recaptcha' ]); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | return $this->postLogin($request); |
@@ -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); |
@@ -72,8 +72,7 @@ |
||
| 72 | 72 | { |
| 73 | 73 | if(isset($this->excludedFromFind) == TRUE && is_array($this->excludedFromFind) == TRUE){ |
| 74 | 74 | return $query->select( array_diff(Schema::getColumnListing($this->table), $this->excludedFromFind) ); |
| 75 | - } |
|
| 76 | - else{ |
|
| 75 | + } else{ |
|
| 77 | 76 | return $query; |
| 78 | 77 | } |
| 79 | 78 | } |
@@ -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); |
@@ -153,8 +153,8 @@ |
||
| 153 | 153 | ]]); |
| 154 | 154 | |
| 155 | 155 | /** |
| 156 | - * Advertising |
|
| 157 | - */ |
|
| 156 | + * Advertising |
|
| 157 | + */ |
|
| 158 | 158 | Route::resource('advert', 'Admin\AdvertController', ['names' => [ |
| 159 | 159 | 'index' => 'advert.index', |
| 160 | 160 | 'create' => 'advert.create', |
@@ -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 | * Main index |
| 24 | 24 | */ |
| 25 | -Route::get('/home', function () { |
|
| 25 | +Route::get('/home', function() { |
|
| 26 | 26 | |
| 27 | 27 | return redirect()->route('admin.dashboard.index'); |
| 28 | 28 | }); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | /** |
| 31 | 31 | * Admin |
| 32 | 32 | */ |
| 33 | -Route::group(['prefix' => env('APP_ADMIN_URL', 'admin'), 'as' => 'admin.', 'middleware' => ['web', 'auth']], function () { |
|
| 33 | +Route::group([ 'prefix' => env('APP_ADMIN_URL', 'admin'), 'as' => 'admin.', 'middleware' => [ 'web', 'auth' ] ], function() { |
|
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | /** |
| 44 | 44 | * Articles and categories |
| 45 | 45 | */ |
| 46 | - Route::resource('page', 'Admin\PageController', ['names' => [ |
|
| 46 | + Route::resource('page', 'Admin\PageController', [ 'names' => [ |
|
| 47 | 47 | 'index' => 'page.index', |
| 48 | 48 | 'create' => 'page.create', |
| 49 | 49 | 'store' => 'page.store', |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | 'edit' => 'page.edit', |
| 52 | 52 | 'update' => 'page.update', |
| 53 | 53 | 'destroy' => 'page.destroy' |
| 54 | - ]]); |
|
| 55 | - Route::resource('pageCategory', 'Admin\PageCategoryController', ['names' => [ |
|
| 54 | + ] ]); |
|
| 55 | + Route::resource('pageCategory', 'Admin\PageCategoryController', [ 'names' => [ |
|
| 56 | 56 | 'index' => 'pageCategory.index', |
| 57 | 57 | 'create' => 'pageCategory.create', |
| 58 | 58 | 'store' => 'pageCategory.store', |
@@ -60,12 +60,12 @@ discard block |
||
| 60 | 60 | 'edit' => 'pageCategory.edit', |
| 61 | 61 | 'update' => 'pageCategory.update', |
| 62 | 62 | 'destroy' => 'pageCategory.destroy' |
| 63 | - ]]); |
|
| 63 | + ] ]); |
|
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * Articles and categories |
| 67 | 67 | */ |
| 68 | - Route::resource('article', 'Admin\ArticleController', ['names' => [ |
|
| 68 | + Route::resource('article', 'Admin\ArticleController', [ 'names' => [ |
|
| 69 | 69 | 'index' => 'article.index', |
| 70 | 70 | 'create' => 'article.create', |
| 71 | 71 | 'store' => 'article.store', |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | 'edit' => 'article.edit', |
| 74 | 74 | 'update' => 'article.update', |
| 75 | 75 | 'destroy' => 'article.destroy' |
| 76 | - ]]); |
|
| 77 | - Route::resource('articleCategory', 'Admin\ArticleCategoryController', ['names' => [ |
|
| 76 | + ] ]); |
|
| 77 | + Route::resource('articleCategory', 'Admin\ArticleCategoryController', [ 'names' => [ |
|
| 78 | 78 | 'index' => 'articleCategory.index', |
| 79 | 79 | 'create' => 'articleCategory.create', |
| 80 | 80 | 'store' => 'articleCategory.store', |
@@ -82,12 +82,12 @@ discard block |
||
| 82 | 82 | 'edit' => 'articleCategory.edit', |
| 83 | 83 | 'update' => 'articleCategory.update', |
| 84 | 84 | 'destroy' => 'articleCategory.destroy' |
| 85 | - ]]); |
|
| 85 | + ] ]); |
|
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * Feedback |
| 89 | 89 | */ |
| 90 | - Route::resource('feedback', 'Admin\FeedbackController', ['names' => [ |
|
| 90 | + Route::resource('feedback', 'Admin\FeedbackController', [ 'names' => [ |
|
| 91 | 91 | 'index' => 'feedback.index', |
| 92 | 92 | 'create' => 'feedback.create', |
| 93 | 93 | 'store' => 'feedback.store', |
@@ -95,12 +95,12 @@ discard block |
||
| 95 | 95 | 'edit' => 'feedback.edit', |
| 96 | 96 | 'update' => 'feedback.update', |
| 97 | 97 | 'destroy' => 'feedback.destroy' |
| 98 | - ]]); |
|
| 98 | + ] ]); |
|
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * Comment |
| 102 | 102 | */ |
| 103 | - Route::resource('comment', 'Admin\CommentController', ['names' => [ |
|
| 103 | + Route::resource('comment', 'Admin\CommentController', [ 'names' => [ |
|
| 104 | 104 | 'index' => 'comment.index', |
| 105 | 105 | 'create' => 'comment.create', |
| 106 | 106 | 'store' => 'comment.store', |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'edit' => 'comment.edit', |
| 109 | 109 | 'update' => 'comment.update', |
| 110 | 110 | 'destroy' => 'comment.destroy' |
| 111 | - ]]); |
|
| 111 | + ] ]); |
|
| 112 | 112 | Route::get('comment/{id}/approve', [ |
| 113 | 113 | 'as' => 'comment.approve', 'uses' => 'Admin\CommentController@approve' |
| 114 | 114 | ]); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | /** |
| 120 | 120 | * Sliders and slides |
| 121 | 121 | */ |
| 122 | - Route::resource('slider', 'Admin\SliderController', ['names' => [ |
|
| 122 | + Route::resource('slider', 'Admin\SliderController', [ 'names' => [ |
|
| 123 | 123 | 'index' => 'slider.index', |
| 124 | 124 | 'create' => 'slider.create', |
| 125 | 125 | 'store' => 'slider.store', |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | 'edit' => 'slider.edit', |
| 128 | 128 | 'update' => 'slider.update', |
| 129 | 129 | 'destroy' => 'slider.destroy' |
| 130 | - ]]); |
|
| 131 | - Route::resource('slide', 'Admin\SlideController', ['names' => [ |
|
| 130 | + ] ]); |
|
| 131 | + Route::resource('slide', 'Admin\SlideController', [ 'names' => [ |
|
| 132 | 132 | 'index' => 'slide.index', |
| 133 | 133 | 'create' => 'slide.create', |
| 134 | 134 | 'store' => 'slide.store', |
@@ -136,12 +136,12 @@ discard block |
||
| 136 | 136 | 'edit' => 'slide.edit', |
| 137 | 137 | 'update' => 'slide.update', |
| 138 | 138 | 'destroy' => 'slide.destroy' |
| 139 | - ]]); |
|
| 139 | + ] ]); |
|
| 140 | 140 | |
| 141 | 141 | /** |
| 142 | 142 | * Images and categories |
| 143 | 143 | */ |
| 144 | - Route::resource('image', 'Admin\ImageController', ['middleware' => ['media.addparameters'], |
|
| 144 | + Route::resource('image', 'Admin\ImageController', [ 'middleware' => [ 'media.addparameters' ], |
|
| 145 | 145 | 'names' => [ |
| 146 | 146 | 'index' => 'image.index', |
| 147 | 147 | 'create' => 'image.create', |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | 'edit' => 'image.edit', |
| 151 | 151 | 'update' => 'image.update', |
| 152 | 152 | 'destroy' => 'image.destroy' |
| 153 | - ]]); |
|
| 154 | - Route::resource('imageCategory', 'Admin\ImageCategoryController', ['names' => [ |
|
| 153 | + ] ]); |
|
| 154 | + Route::resource('imageCategory', 'Admin\ImageCategoryController', [ 'names' => [ |
|
| 155 | 155 | 'index' => 'imageCategory.index', |
| 156 | 156 | 'create' => 'imageCategory.create', |
| 157 | 157 | 'store' => 'imageCategory.store', |
@@ -159,12 +159,12 @@ discard block |
||
| 159 | 159 | 'edit' => 'imageCategory.edit', |
| 160 | 160 | 'update' => 'imageCategory.update', |
| 161 | 161 | 'destroy' => 'imageCategory.destroy' |
| 162 | - ]]); |
|
| 162 | + ] ]); |
|
| 163 | 163 | |
| 164 | 164 | /** |
| 165 | 165 | * Advertising |
| 166 | 166 | */ |
| 167 | - Route::resource('advert', 'Admin\AdvertController', ['names' => [ |
|
| 167 | + Route::resource('advert', 'Admin\AdvertController', [ 'names' => [ |
|
| 168 | 168 | 'index' => 'advert.index', |
| 169 | 169 | 'create' => 'advert.create', |
| 170 | 170 | 'store' => 'advert.store', |
@@ -172,8 +172,8 @@ discard block |
||
| 172 | 172 | 'edit' => 'advert.edit', |
| 173 | 173 | 'update' => 'advert.update', |
| 174 | 174 | 'destroy' => 'advert.destroy' |
| 175 | - ]]); |
|
| 176 | - Route::resource('advertLocation', 'Admin\AdvertLocationController', ['names' => [ |
|
| 175 | + ] ]); |
|
| 176 | + Route::resource('advertLocation', 'Admin\AdvertLocationController', [ 'names' => [ |
|
| 177 | 177 | 'index' => 'advertLocation.index', |
| 178 | 178 | 'create' => 'advertLocation.create', |
| 179 | 179 | 'store' => 'advertLocation.store', |
@@ -181,12 +181,12 @@ discard block |
||
| 181 | 181 | 'edit' => 'advertLocation.edit', |
| 182 | 182 | 'update' => 'advertLocation.update', |
| 183 | 183 | 'destroy' => 'advertLocation.destroy' |
| 184 | - ]]); |
|
| 184 | + ] ]); |
|
| 185 | 185 | |
| 186 | 186 | /** |
| 187 | 187 | * Products and categories |
| 188 | 188 | */ |
| 189 | - Route::resource('productCategory', 'Admin\ProductCategoryController', ['names' => [ |
|
| 189 | + Route::resource('productCategory', 'Admin\ProductCategoryController', [ 'names' => [ |
|
| 190 | 190 | 'index' => 'productCategory.index', |
| 191 | 191 | 'create' => 'productCategory.create', |
| 192 | 192 | 'store' => 'productCategory.store', |
@@ -194,8 +194,8 @@ discard block |
||
| 194 | 194 | 'edit' => 'productCategory.edit', |
| 195 | 195 | 'update' => 'productCategory.update', |
| 196 | 196 | 'destroy' => 'productCategory.destroy' |
| 197 | - ]]); |
|
| 198 | - Route::resource('product', 'Admin\ProductController', ['names' => [ |
|
| 197 | + ] ]); |
|
| 198 | + Route::resource('product', 'Admin\ProductController', [ 'names' => [ |
|
| 199 | 199 | 'index' => 'product.index', |
| 200 | 200 | 'create' => 'product.create', |
| 201 | 201 | 'store' => 'product.store', |
@@ -203,13 +203,13 @@ discard block |
||
| 203 | 203 | 'edit' => 'product.edit', |
| 204 | 204 | 'update' => 'product.update', |
| 205 | 205 | 'destroy' => 'product.destroy' |
| 206 | - ]]); |
|
| 206 | + ] ]); |
|
| 207 | 207 | |
| 208 | 208 | /** |
| 209 | 209 | * Settings |
| 210 | 210 | */ |
| 211 | 211 | Route::resource('settings', 'Admin\SettingsController', [ |
| 212 | - 'except' => ['delete', 'show'], |
|
| 212 | + 'except' => [ 'delete', 'show' ], |
|
| 213 | 213 | 'names' => [ |
| 214 | 214 | 'index' => 'settings.index', |
| 215 | 215 | 'create' => 'settings.create', |
@@ -218,13 +218,13 @@ discard block |
||
| 218 | 218 | 'edit' => 'settings.edit', |
| 219 | 219 | 'update' => 'settings.update', |
| 220 | 220 | 'destroy' => 'settings.destroy' |
| 221 | - ]]); |
|
| 221 | + ] ]); |
|
| 222 | 222 | |
| 223 | 223 | /** |
| 224 | 224 | * Users |
| 225 | 225 | */ |
| 226 | 226 | Route::resource('user', 'Admin\UserController', [ |
| 227 | - 'except' => ['show'], |
|
| 227 | + 'except' => [ 'show' ], |
|
| 228 | 228 | 'names' => [ |
| 229 | 229 | 'index' => 'user.index', |
| 230 | 230 | 'create' => 'user.create', |
@@ -233,14 +233,14 @@ discard block |
||
| 233 | 233 | 'edit' => 'user.edit', |
| 234 | 234 | 'update' => 'user.update', |
| 235 | 235 | 'destroy' => 'user.destroy' |
| 236 | - ]]); |
|
| 236 | + ] ]); |
|
| 237 | 237 | |
| 238 | 238 | }); |
| 239 | 239 | |
| 240 | 240 | /** |
| 241 | 241 | * Authentication |
| 242 | 242 | */ |
| 243 | -Route::group(['middleware' => 'web'], function () { |
|
| 243 | +Route::group([ 'middleware' => 'web' ], function() { |
|
| 244 | 244 | |
| 245 | 245 | Route::get('login', 'Auth\LoginController@showLoginForm')->name('login'); |
| 246 | 246 | Route::post('login', 'Auth\LoginController@login')->name('authPostLogin'); |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | /** |
| 261 | 261 | * Images |
| 262 | 262 | */ |
| 263 | -Route::get('/' . env('APP_IMAGE_URL', 'images').'/{imageName}.{imageExtension}', [ |
|
| 263 | +Route::get('/' . env('APP_IMAGE_URL', 'images') . '/{imageName}.{imageExtension}', [ |
|
| 264 | 264 | 'as' => 'getImage', 'uses' => 'Media\ImageController@getImage' |
| 265 | 265 | ]); |
| 266 | 266 | |
@@ -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 | } |