@@ -151,8 +151,6 @@ discard block |
||
151 | 151 | /** |
152 | 152 | * Save transaction |
153 | 153 | * |
154 | - * @param int $typeId |
|
155 | - * @param string $text |
|
156 | 154 | * @param $userId |
157 | 155 | * @param $amount |
158 | 156 | */ |
@@ -242,7 +240,7 @@ discard block |
||
242 | 240 | * Change ar result if necessary |
243 | 241 | * |
244 | 242 | * @param $arResult |
245 | - * @return mixed |
|
243 | + * @return string|null |
|
246 | 244 | */ |
247 | 245 | public function changeEditResultField($arResult){ |
248 | 246 | return $arResult; |
@@ -319,7 +317,7 @@ discard block |
||
319 | 317 | * Store a newly created resource in storage. |
320 | 318 | * |
321 | 319 | * @param Request $request |
322 | - * @return Response |
|
320 | + * @return \Illuminate\Http\RedirectResponse |
|
323 | 321 | */ |
324 | 322 | public function store(Request $request) { |
325 | 323 | |
@@ -459,7 +457,7 @@ discard block |
||
459 | 457 | * |
460 | 458 | * @param Request $request |
461 | 459 | * @param int $id |
462 | - * @return Response |
|
460 | + * @return \Illuminate\Http\RedirectResponse |
|
463 | 461 | */ |
464 | 462 | public function update(Request $request, $id) { |
465 | 463 | |
@@ -591,7 +589,7 @@ discard block |
||
591 | 589 | * Remove the specified resource from storage. |
592 | 590 | * |
593 | 591 | * @param int $id |
594 | - * @return Response |
|
592 | + * @return \Illuminate\Http\RedirectResponse |
|
595 | 593 | */ |
596 | 594 | |
597 | 595 | public function destroy($id) { |
@@ -20,8 +20,6 @@ |
||
20 | 20 | use Illuminate\Support\Facades\View; |
21 | 21 | use App\Http\Controllers\Controller; |
22 | 22 | use Illuminate\Database\Eloquent\Builder; |
23 | -use Illuminate\Support\Facades\DB; |
|
24 | -use Carbon\Carbon; |
|
25 | 23 | use App\Transaction; |
26 | 24 | use App\User; |
27 | 25 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | use App\Transaction; |
26 | 26 | use App\User; |
27 | 27 | |
28 | -class AdminModuleController extends Controller{ |
|
28 | +class AdminModuleController extends Controller { |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Module name |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * Module name for blade |
145 | 145 | */ |
146 | 146 | $temp = explode('.', $this->moduleBasicRoute); |
147 | - View::share('moduleNameBlade', strtolower($temp[0] . "_module_" . $temp[1])); |
|
147 | + View::share('moduleNameBlade', strtolower($temp[ 0 ] . "_module_" . $temp[ 1 ])); |
|
148 | 148 | |
149 | 149 | } |
150 | 150 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @param $amount |
158 | 158 | */ |
159 | 159 | protected function _saveTransation($status_id = 1, $user_id, $amount, |
160 | - $campaign_id = null, $payment_id = null, $recommendation_id = null){ |
|
160 | + $campaign_id = null, $payment_id = null, $recommendation_id = null) { |
|
161 | 161 | |
162 | 162 | /** |
163 | 163 | * Save transaction |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * @param boolean $update |
188 | 188 | * @return boolean |
189 | 189 | */ |
190 | - public function saveMediaToStorage($object, $request, $update = FALSE){ |
|
190 | + public function saveMediaToStorage($object, $request, $update = FALSE) { |
|
191 | 191 | |
192 | 192 | return FALSE; |
193 | 193 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | return env('ADMIN_PAGINATE', 10); |
205 | 205 | } |
206 | - else{ |
|
206 | + else { |
|
207 | 207 | |
208 | 208 | return $this->paginateRows; |
209 | 209 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | * @param object $object |
216 | 216 | * @param Request $request |
217 | 217 | */ |
218 | - public function associateRelationships($object, Request $request){ |
|
218 | + public function associateRelationships($object, Request $request) { |
|
219 | 219 | |
220 | 220 | } |
221 | 221 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | * @param object $object |
226 | 226 | * @param Request $request |
227 | 227 | */ |
228 | - public function associateRelationshipsWithID($object, Request $request){ |
|
228 | + public function associateRelationshipsWithID($object, Request $request) { |
|
229 | 229 | |
230 | 230 | } |
231 | 231 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | * |
235 | 235 | * @param object $object |
236 | 236 | */ |
237 | - public function resetCache($object){ |
|
237 | + public function resetCache($object) { |
|
238 | 238 | |
239 | 239 | } |
240 | 240 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | * @param $arResult |
245 | 245 | * @return mixed |
246 | 246 | */ |
247 | - public function changeEditResultField($arResult){ |
|
247 | + public function changeEditResultField($arResult) { |
|
248 | 248 | return $arResult; |
249 | 249 | } |
250 | 250 | |
@@ -278,10 +278,10 @@ discard block |
||
278 | 278 | /** |
279 | 279 | * Choose the view |
280 | 280 | */ |
281 | - if(empty($this->customView['index']) == TRUE){ |
|
281 | + if (empty($this->customView[ 'index' ]) == TRUE) { |
|
282 | 282 | $view = $this->moduleBasicTemplatePath . '.index'; |
283 | 283 | } |
284 | - else{ |
|
284 | + else { |
|
285 | 285 | $view = $this->customView; |
286 | 286 | } |
287 | 287 | |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | /** |
290 | 290 | * Return page |
291 | 291 | */ |
292 | - return view($view, ['results' => $arResults]); |
|
292 | + return view($view, [ 'results' => $arResults ]); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
@@ -302,10 +302,10 @@ discard block |
||
302 | 302 | /** |
303 | 303 | * Choose the view |
304 | 304 | */ |
305 | - if(empty($this->customView['index']) == TRUE){ |
|
305 | + if (empty($this->customView[ 'index' ]) == TRUE) { |
|
306 | 306 | $view = $this->moduleBasicTemplatePath . '.create_edit'; |
307 | 307 | } |
308 | - else{ |
|
308 | + else { |
|
309 | 309 | $view = $this->customView; |
310 | 310 | } |
311 | 311 | |
@@ -327,8 +327,8 @@ discard block |
||
327 | 327 | * Change the validation array |
328 | 328 | */ |
329 | 329 | foreach ($this->arValidationArray as $name => $value) { |
330 | - if(strpos($this->arValidationArray[$name], 'unique') > 0){ |
|
331 | - $this->arValidationArray[$name] = $value . ',NULL,id,deleted_at,NULL'; |
|
330 | + if (strpos($this->arValidationArray[ $name ], 'unique') > 0) { |
|
331 | + $this->arValidationArray[ $name ] = $value . ',NULL,id,deleted_at,NULL'; |
|
332 | 332 | } |
333 | 333 | } |
334 | 334 | |
@@ -351,16 +351,16 @@ discard block |
||
351 | 351 | /** |
352 | 352 | * Datetime |
353 | 353 | */ |
354 | - if(in_array($name, $this->dateTimeLocalFields)){ |
|
354 | + if (in_array($name, $this->dateTimeLocalFields)) { |
|
355 | 355 | |
356 | - $object->{$name} = str_replace('T', ' ', $request->input($name)). ':00'; |
|
356 | + $object->{$name} = str_replace('T', ' ', $request->input($name)) . ':00'; |
|
357 | 357 | } |
358 | 358 | else { |
359 | 359 | |
360 | 360 | /** |
361 | 361 | * Change to null if needed |
362 | 362 | */ |
363 | - if(strlen($request->$name) < 1){ |
|
363 | + if (strlen($request->$name) < 1) { |
|
364 | 364 | $object->{$name} = null; |
365 | 365 | } |
366 | 366 | else { |
@@ -411,28 +411,28 @@ discard block |
||
411 | 411 | * Get the row |
412 | 412 | */ |
413 | 413 | $arResults = $modelClass::where('id', $id)->relationships()->excludeFromFind()->get(); |
414 | - $arResults = $arResults[0]; |
|
414 | + $arResults = $arResults[ 0 ]; |
|
415 | 415 | |
416 | 416 | /** |
417 | 417 | * Row does not exist - redirect |
418 | 418 | */ |
419 | 419 | if (count($arResults) == 0) { |
420 | 420 | |
421 | - return redirect(route($this->moduleBasicRoute . '.index'))->withInput()->withErrors(['edit' => trans('validation.row_not_exist')]); |
|
421 | + return redirect(route($this->moduleBasicRoute . '.index'))->withInput()->withErrors([ 'edit' => trans('validation.row_not_exist') ]); |
|
422 | 422 | } |
423 | 423 | |
424 | 424 | /** |
425 | 425 | * Set the put method for update |
426 | 426 | */ |
427 | - $arResults['_method'] = 'PUT'; |
|
427 | + $arResults[ '_method' ] = 'PUT'; |
|
428 | 428 | |
429 | 429 | /** |
430 | 430 | * Choose the view |
431 | 431 | */ |
432 | - if(empty($this->customView['index']) == TRUE){ |
|
432 | + if (empty($this->customView[ 'index' ]) == TRUE) { |
|
433 | 433 | $view = $this->moduleBasicTemplatePath . '.create_edit'; |
434 | 434 | } |
435 | - else{ |
|
435 | + else { |
|
436 | 436 | $view = $this->customView; |
437 | 437 | } |
438 | 438 | |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | /** |
442 | 442 | * Return page |
443 | 443 | */ |
444 | - return view($view, ['results' => $arResults]); |
|
444 | + return view($view, [ 'results' => $arResults ]); |
|
445 | 445 | } |
446 | 446 | |
447 | 447 | /** |
@@ -470,8 +470,8 @@ discard block |
||
470 | 470 | */ |
471 | 471 | foreach ($this->arValidationArray as $name => $value) { |
472 | 472 | |
473 | - if(strpos($this->arValidationArray[$name], 'unique') > 0){ |
|
474 | - $this->arValidationArray[$name] = $value . ','.$id.',id,deleted_at,NULL'; |
|
473 | + if (strpos($this->arValidationArray[ $name ], 'unique') > 0) { |
|
474 | + $this->arValidationArray[ $name ] = $value . ',' . $id . ',id,deleted_at,NULL'; |
|
475 | 475 | } |
476 | 476 | } |
477 | 477 | |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | */ |
492 | 492 | if ($arResults == FALSE) { |
493 | 493 | |
494 | - return redirect(route($this->moduleBasicRoute . '.index'))->withInput()->withErrors(['edit' => trans('validation.row_not_exist')]); |
|
494 | + return redirect(route($this->moduleBasicRoute . '.index'))->withInput()->withErrors([ 'edit' => trans('validation.row_not_exist') ]); |
|
495 | 495 | } |
496 | 496 | |
497 | 497 | /** |
@@ -508,10 +508,10 @@ discard block |
||
508 | 508 | * Binary fields will not be updated if empty |
509 | 509 | * |
510 | 510 | */ |
511 | - if(in_array($name, $this->binaryFields)){ |
|
511 | + if (in_array($name, $this->binaryFields)) { |
|
512 | 512 | |
513 | 513 | } |
514 | - else{ |
|
514 | + else { |
|
515 | 515 | |
516 | 516 | /** |
517 | 517 | * Empty exception |
@@ -521,26 +521,26 @@ discard block |
||
521 | 521 | /** |
522 | 522 | * Datetime |
523 | 523 | */ |
524 | - if(in_array($name, $this->dateTimeLocalFields)){ |
|
524 | + if (in_array($name, $this->dateTimeLocalFields)) { |
|
525 | 525 | |
526 | - $arResults->$name = str_replace('T', ' ', $request->input($name)). ':00'; |
|
526 | + $arResults->$name = str_replace('T', ' ', $request->input($name)) . ':00'; |
|
527 | 527 | } |
528 | 528 | else { |
529 | 529 | $arResults->$name = $request->input($name); |
530 | 530 | } |
531 | 531 | } |
532 | 532 | |
533 | - else{ |
|
533 | + else { |
|
534 | 534 | |
535 | 535 | /** |
536 | 536 | * Numeric zero ? |
537 | 537 | */ |
538 | - if(isset($request->name) && is_numeric($request->input($name)) == TRUE){ |
|
538 | + if (isset($request->name) && is_numeric($request->input($name)) == TRUE) { |
|
539 | 539 | |
540 | 540 | $arResults->$name = $request->input($name); |
541 | 541 | } |
542 | 542 | |
543 | - else{ |
|
543 | + else { |
|
544 | 544 | $arResults->$name = NULL; |
545 | 545 | } |
546 | 546 | } |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | /** |
558 | 558 | * Save media to storage |
559 | 559 | */ |
560 | - if($this->saveMediaToStorage($arResults, $request, TRUE) == TRUE){ |
|
560 | + if ($this->saveMediaToStorage($arResults, $request, TRUE) == TRUE) { |
|
561 | 561 | |
562 | 562 | // Update binary fields |
563 | 563 | foreach ($this->binaryFields as $name => $value) { |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | if (empty($request->$value) == FALSE) { |
566 | 566 | $arResults->$value = $request->$value; |
567 | 567 | } |
568 | - else{ |
|
568 | + else { |
|
569 | 569 | $arResults->$value = NULL; |
570 | 570 | } |
571 | 571 | } |
@@ -202,8 +202,7 @@ discard block |
||
202 | 202 | if ($this->paginateRows == NULL) { |
203 | 203 | |
204 | 204 | return env('ADMIN_PAGINATE', 10); |
205 | - } |
|
206 | - else{ |
|
205 | + } else{ |
|
207 | 206 | |
208 | 207 | return $this->paginateRows; |
209 | 208 | } |
@@ -280,8 +279,7 @@ discard block |
||
280 | 279 | */ |
281 | 280 | if(empty($this->customView['index']) == TRUE){ |
282 | 281 | $view = $this->moduleBasicTemplatePath . '.index'; |
283 | - } |
|
284 | - else{ |
|
282 | + } else{ |
|
285 | 283 | $view = $this->customView; |
286 | 284 | } |
287 | 285 | |
@@ -304,8 +302,7 @@ discard block |
||
304 | 302 | */ |
305 | 303 | if(empty($this->customView['index']) == TRUE){ |
306 | 304 | $view = $this->moduleBasicTemplatePath . '.create_edit'; |
307 | - } |
|
308 | - else{ |
|
305 | + } else{ |
|
309 | 306 | $view = $this->customView; |
310 | 307 | } |
311 | 308 | |
@@ -354,16 +351,14 @@ discard block |
||
354 | 351 | if(in_array($name, $this->dateTimeLocalFields)){ |
355 | 352 | |
356 | 353 | $object->{$name} = str_replace('T', ' ', $request->input($name)). ':00'; |
357 | - } |
|
358 | - else { |
|
354 | + } else { |
|
359 | 355 | |
360 | 356 | /** |
361 | 357 | * Change to null if needed |
362 | 358 | */ |
363 | 359 | if(strlen($request->$name) < 1){ |
364 | 360 | $object->{$name} = null; |
365 | - } |
|
366 | - else { |
|
361 | + } else { |
|
367 | 362 | $object->{$name} = $request->input($name); |
368 | 363 | } |
369 | 364 | } |
@@ -431,8 +426,7 @@ discard block |
||
431 | 426 | */ |
432 | 427 | if(empty($this->customView['index']) == TRUE){ |
433 | 428 | $view = $this->moduleBasicTemplatePath . '.create_edit'; |
434 | - } |
|
435 | - else{ |
|
429 | + } else{ |
|
436 | 430 | $view = $this->customView; |
437 | 431 | } |
438 | 432 | |
@@ -510,8 +504,7 @@ discard block |
||
510 | 504 | */ |
511 | 505 | if(in_array($name, $this->binaryFields)){ |
512 | 506 | |
513 | - } |
|
514 | - else{ |
|
507 | + } else{ |
|
515 | 508 | |
516 | 509 | /** |
517 | 510 | * Empty exception |
@@ -524,13 +517,10 @@ discard block |
||
524 | 517 | if(in_array($name, $this->dateTimeLocalFields)){ |
525 | 518 | |
526 | 519 | $arResults->$name = str_replace('T', ' ', $request->input($name)). ':00'; |
527 | - } |
|
528 | - else { |
|
520 | + } else { |
|
529 | 521 | $arResults->$name = $request->input($name); |
530 | 522 | } |
531 | - } |
|
532 | - |
|
533 | - else{ |
|
523 | + } else{ |
|
534 | 524 | |
535 | 525 | /** |
536 | 526 | * Numeric zero ? |
@@ -538,9 +528,7 @@ discard block |
||
538 | 528 | if(isset($request->name) && is_numeric($request->input($name)) == TRUE){ |
539 | 529 | |
540 | 530 | $arResults->$name = $request->input($name); |
541 | - } |
|
542 | - |
|
543 | - else{ |
|
531 | + } else{ |
|
544 | 532 | $arResults->$name = NULL; |
545 | 533 | } |
546 | 534 | } |
@@ -564,8 +552,7 @@ discard block |
||
564 | 552 | |
565 | 553 | if (empty($request->$value) == FALSE) { |
566 | 554 | $arResults->$value = $request->$value; |
567 | - } |
|
568 | - else{ |
|
555 | + } else{ |
|
569 | 556 | $arResults->$value = NULL; |
570 | 557 | } |
571 | 558 | } |
@@ -67,6 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | /** |
69 | 69 | * Reset all session fields |
70 | + * @param \Illuminate\Http\Request $request |
|
70 | 71 | */ |
71 | 72 | protected function _resetSessionFields($request){ |
72 | 73 | |
@@ -130,6 +131,9 @@ discard block |
||
130 | 131 | return Page::findOrFail($id); |
131 | 132 | } |
132 | 133 | |
134 | + /** |
|
135 | + * @param integer $id |
|
136 | + */ |
|
133 | 137 | protected function _getSettings($id){ |
134 | 138 | |
135 | 139 | $settings = Settings::find($id); |
@@ -145,8 +149,6 @@ discard block |
||
145 | 149 | /** |
146 | 150 | * Save transaction |
147 | 151 | * |
148 | - * @param int $typeId |
|
149 | - * @param string $text |
|
150 | 152 | * @param $userId |
151 | 153 | * @param $amount |
152 | 154 | */ |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | * |
32 | 32 | * @var array |
33 | 33 | */ |
34 | - protected $_arViewData = []; |
|
34 | + protected $_arViewData = [ ]; |
|
35 | 35 | |
36 | - protected $_arViewGeneratedData = []; |
|
36 | + protected $_arViewGeneratedData = [ ]; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * Check if view exists, if so - return, if not throw 404 |
@@ -41,13 +41,13 @@ discard block |
||
41 | 41 | * @param string $strView |
42 | 42 | * @return View|void |
43 | 43 | */ |
44 | - protected function _showViewOr404($strView){ |
|
44 | + protected function _showViewOr404($strView) { |
|
45 | 45 | |
46 | 46 | |
47 | 47 | if (view()->exists($strView)) { |
48 | 48 | return view($strView, $this->_arViewData); |
49 | 49 | } |
50 | - else{ |
|
50 | + else { |
|
51 | 51 | return abort(404); |
52 | 52 | } |
53 | 53 | } |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | * Save all inputs to session |
57 | 57 | * @param $request |
58 | 58 | */ |
59 | - protected function _saveSessionFields($request){ |
|
59 | + protected function _saveSessionFields($request) { |
|
60 | 60 | |
61 | - foreach ($request->all() as $key=>$value){ |
|
62 | - $arData[$key] = $value; |
|
61 | + foreach ($request->all() as $key=>$value) { |
|
62 | + $arData[ $key ] = $value; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | $request->session()->put('frontend_fields', $arData); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * Reset all session fields |
70 | 70 | */ |
71 | - protected function _resetSessionFields($request){ |
|
71 | + protected function _resetSessionFields($request) { |
|
72 | 72 | |
73 | 73 | $request->session()->forget('frontend_fields'); |
74 | 74 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * |
79 | 79 | * @param $request |
80 | 80 | */ |
81 | - protected function _calculatePrice($request){ |
|
81 | + protected function _calculatePrice($request) { |
|
82 | 82 | |
83 | 83 | return 0; |
84 | 84 | } |
@@ -89,24 +89,24 @@ discard block |
||
89 | 89 | * @param $request |
90 | 90 | * @return mixed |
91 | 91 | */ |
92 | - protected function _getSessionFields($request){ |
|
92 | + protected function _getSessionFields($request) { |
|
93 | 93 | |
94 | 94 | $fields = $request->session()->get('frontend_fields'); |
95 | 95 | |
96 | - if(isset($request->id)){ |
|
96 | + if (isset($request->id)) { |
|
97 | 97 | //$fields['price'] = $this->_calculatePrice($request); |
98 | 98 | } |
99 | 99 | |
100 | - if(isset($fields['city'])) { |
|
101 | - $arCityInfo = explode('|', $fields['city']); |
|
100 | + if (isset($fields[ 'city' ])) { |
|
101 | + $arCityInfo = explode('|', $fields[ 'city' ]); |
|
102 | 102 | |
103 | - $fields['citypart'] = @trim($arCityInfo[0]); |
|
104 | - $fields['citymain'] = @trim($arCityInfo[1]); |
|
105 | - $fields['county'] = @trim($arCityInfo[2]); |
|
106 | - $fields['zip'] = @trim($arCityInfo[3]); |
|
103 | + $fields[ 'citypart' ] = @trim($arCityInfo[ 0 ]); |
|
104 | + $fields[ 'citymain' ] = @trim($arCityInfo[ 1 ]); |
|
105 | + $fields[ 'county' ] = @trim($arCityInfo[ 2 ]); |
|
106 | + $fields[ 'zip' ] = @trim($arCityInfo[ 3 ]); |
|
107 | 107 | } |
108 | 108 | |
109 | - $this->_arViewData['fields'] = $fields; |
|
109 | + $this->_arViewData[ 'fields' ] = $fields; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @param $url |
116 | 116 | * @return mixed |
117 | 117 | */ |
118 | - protected function _loadPageByUrl($url){ |
|
118 | + protected function _loadPageByUrl($url) { |
|
119 | 119 | |
120 | 120 | return Page::where('url', $url)->firstOrFail(); |
121 | 121 | } |
@@ -126,18 +126,18 @@ discard block |
||
126 | 126 | * @param $id |
127 | 127 | * @return mixed |
128 | 128 | */ |
129 | - protected function _loadPageById($id){ |
|
129 | + protected function _loadPageById($id) { |
|
130 | 130 | return Page::findOrFail($id); |
131 | 131 | } |
132 | 132 | |
133 | - protected function _getSettings($id){ |
|
133 | + protected function _getSettings($id) { |
|
134 | 134 | |
135 | 135 | $settings = Settings::find($id); |
136 | 136 | |
137 | - if(!empty($settings)){ |
|
138 | - return $settings['value']; |
|
137 | + if (!empty($settings)) { |
|
138 | + return $settings[ 'value' ]; |
|
139 | 139 | } |
140 | - else{ |
|
140 | + else { |
|
141 | 141 | return NULL; |
142 | 142 | } |
143 | 143 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * @param $amount |
152 | 152 | */ |
153 | 153 | protected function _saveTransation($status_id = 1, $user_id, $amount, |
154 | - $campaign_id = null, $payment_id = null, $recommendation_id = null){ |
|
154 | + $campaign_id = null, $payment_id = null, $recommendation_id = null) { |
|
155 | 155 | |
156 | 156 | /** |
157 | 157 | * Save transaction |
@@ -46,8 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | if (view()->exists($strView)) { |
48 | 48 | return view($strView, $this->_arViewData); |
49 | - } |
|
50 | - else{ |
|
49 | + } else{ |
|
51 | 50 | return abort(404); |
52 | 51 | } |
53 | 52 | } |
@@ -136,8 +135,7 @@ discard block |
||
136 | 135 | |
137 | 136 | if(!empty($settings)){ |
138 | 137 | return $settings['value']; |
139 | - } |
|
140 | - else{ |
|
138 | + } else{ |
|
141 | 139 | return NULL; |
142 | 140 | } |
143 | 141 | } |
@@ -15,7 +15,6 @@ |
||
15 | 15 | namespace App\Http\Controllers\Frontend; |
16 | 16 | |
17 | 17 | |
18 | -use App\Application; |
|
19 | 18 | use App\Campaign; |
20 | 19 | use App\Payment; |
21 | 20 | use App\Transaction; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @param Request $request |
41 | 41 | * @return View|void |
42 | 42 | */ |
43 | - public function getHomepage(Request $request){ |
|
43 | + public function getHomepage(Request $request) { |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * Load data |
@@ -50,22 +50,22 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Number of users |
52 | 52 | */ |
53 | - $this->_arViewData['users_no'] = User::count() + 135000; |
|
53 | + $this->_arViewData[ 'users_no' ] = User::count() + 135000; |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Number of campaigns |
57 | 57 | */ |
58 | - $this->_arViewData['campaigns_no'] = Campaign::count(); |
|
58 | + $this->_arViewData[ 'campaigns_no' ] = Campaign::count(); |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Number of payments total |
62 | 62 | */ |
63 | - $this->_arViewData['payments_no_total'] = Payment::sum('amount'); |
|
63 | + $this->_arViewData[ 'payments_no_total' ] = Payment::sum('amount'); |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Number of payments last month |
67 | 67 | */ |
68 | - $this->_arViewData['payments_no_last_month'] = Payment::where('created_at', '>=', Carbon::now()->subMonth())->count(); |
|
68 | + $this->_arViewData[ 'payments_no_last_month' ] = Payment::where('created_at', '>=', Carbon::now()->subMonth())->count(); |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Return view |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @param Request $request |
80 | 80 | * @return View|void |
81 | 81 | */ |
82 | - public function getContact(Request $request){ |
|
82 | + public function getContact(Request $request) { |
|
83 | 83 | |
84 | 84 | /** |
85 | 85 | * Clear sessions |
@@ -103,12 +103,12 @@ discard block |
||
103 | 103 | * @param Request $request |
104 | 104 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector |
105 | 105 | */ |
106 | - public function registerEmail(Request $request){ |
|
106 | + public function registerEmail(Request $request) { |
|
107 | 107 | |
108 | 108 | /** |
109 | 109 | * Validate |
110 | 110 | */ |
111 | - if(env('RECAPTCHA_ENABLED') == 1){ |
|
111 | + if (env('RECAPTCHA_ENABLED') == 1) { |
|
112 | 112 | $this->validate($request, [ |
113 | 113 | 'email' => 'email|required|max:255', |
114 | 114 | 'g-recaptcha-response' => 'required|recaptcha' |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | /** |
144 | 144 | * User not exists |
145 | 145 | */ |
146 | - if(empty($user)){ |
|
146 | + if (empty($user)) { |
|
147 | 147 | |
148 | 148 | $login = $email; |
149 | 149 | $password = str_random(10); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | /** |
160 | 160 | * Save recommendation |
161 | 161 | */ |
162 | - if(Cache::has('recommendation_id')){ |
|
162 | + if (Cache::has('recommendation_id')) { |
|
163 | 163 | |
164 | 164 | $recommendation_id = Cache::get('recommendation_id'); |
165 | 165 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | /** |
178 | 178 | * If not , add to user |
179 | 179 | */ |
180 | - if(empty($test)){ |
|
180 | + if (empty($test)) { |
|
181 | 181 | $user->recommendation_id = $recommendation_id; |
182 | 182 | |
183 | 183 | } |
@@ -188,13 +188,13 @@ discard block |
||
188 | 188 | /** |
189 | 189 | * Send e-mail |
190 | 190 | */ |
191 | - Mail::send(['emails.html.registration', 'emails.plain.registration'], [ |
|
191 | + Mail::send([ 'emails.html.registration', 'emails.plain.registration' ], [ |
|
192 | 192 | 'user' => $user, |
193 | 193 | 'login' => $login, |
194 | 194 | 'password' => $password, |
195 | 195 | 'activation_code' => $activation_code |
196 | 196 | |
197 | - ], function ($message) { |
|
197 | + ], function($message) { |
|
198 | 198 | $message->from(env('MAIL_FROM_EMAIL', '[email protected]'), env('MAIL_FROM_NAME', 'Surimail.cz')); |
199 | 199 | $message->to(request('email'), request('email')); |
200 | 200 | $message->subject('Registrace na serveru Surimail.cz'); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | /** |
208 | 208 | * User exists - error |
209 | 209 | */ |
210 | - else{ |
|
210 | + else { |
|
211 | 211 | |
212 | 212 | $request->session()->flash('custom_error', 'Zadaný e-mail nebo IP již existuje'); |
213 | 213 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * @param Request $request |
224 | 224 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector |
225 | 225 | */ |
226 | - public function checkActivationCode($email, $activationCode, Request $request){ |
|
226 | + public function checkActivationCode($email, $activationCode, Request $request) { |
|
227 | 227 | |
228 | 228 | /** |
229 | 229 | * Check if user exists |
@@ -233,14 +233,14 @@ discard block |
||
233 | 233 | /** |
234 | 234 | * User not exists or code is not valid |
235 | 235 | */ |
236 | - if(empty($user)){ |
|
236 | + if (empty($user)) { |
|
237 | 237 | $request->session()->flash('custom_error', 'Zadaný e-mail neexistuje nebo je neplatný aktivační kód'); |
238 | 238 | } |
239 | 239 | |
240 | 240 | /** |
241 | 241 | * User exists - activate him |
242 | 242 | */ |
243 | - else{ |
|
243 | + else { |
|
244 | 244 | $user->active = true; |
245 | 245 | $user->activation_code = str_random(16); |
246 | 246 | $user->save(); |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | * Add reward for registration |
250 | 250 | */ |
251 | 251 | $rewardsCount = Transaction::where('transactionstatus_id', 5)->where('user_id', $user->id)->count(); |
252 | - if($rewardsCount < 1){ |
|
252 | + if ($rewardsCount < 1) { |
|
253 | 253 | |
254 | 254 | /** |
255 | 255 | * Save transaction |
@@ -261,25 +261,25 @@ discard block |
||
261 | 261 | * Add reward for recommedation |
262 | 262 | */ |
263 | 263 | |
264 | - if(!empty($user->recomendation_id) ){ |
|
264 | + if (!empty($user->recomendation_id)) { |
|
265 | 265 | |
266 | 266 | $recommendation = Recommendation::find($user->reccomendation_id); |
267 | 267 | |
268 | - if(!empty($recommendation)){ |
|
268 | + if (!empty($recommendation)) { |
|
269 | 269 | |
270 | 270 | /** |
271 | 271 | * Check transaction |
272 | 272 | */ |
273 | 273 | $transactionCount = Transaction::where('recommendation_id', $recommendation->id)->count(); |
274 | 274 | |
275 | - if($transactionCount < 1){ |
|
275 | + if ($transactionCount < 1) { |
|
276 | 276 | |
277 | 277 | /** |
278 | 278 | * Find user and save money |
279 | 279 | */ |
280 | 280 | $rUser = User::find($recommendation->user_id); |
281 | 281 | |
282 | - if(!empty($rUser)){ |
|
282 | + if (!empty($rUser)) { |
|
283 | 283 | |
284 | 284 | $this->_saveTransation(2, $rUser->id, $this->_getSettings(2)); |
285 | 285 | } |
@@ -288,12 +288,12 @@ discard block |
||
288 | 288 | } |
289 | 289 | |
290 | 290 | $request->session()->flash('success', 'Gratulujeme, váš účet byl úspěšně aktivován. Přihlásit se můžete zde: ' |
291 | - . '<br><a href="'.route('admin.dashboard.index').'">'.route('admin.dashboard.index').'</a>'); |
|
291 | + . '<br><a href="' . route('admin.dashboard.index') . '">' . route('admin.dashboard.index') . '</a>'); |
|
292 | 292 | |
293 | 293 | /** |
294 | 294 | * Save reward |
295 | 295 | */ |
296 | - if($user->recommendation_id != null && $user->recommendation_id > 0){ |
|
296 | + if ($user->recommendation_id != null && $user->recommendation_id > 0) { |
|
297 | 297 | |
298 | 298 | /** |
299 | 299 | * Load recommendation |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | * @param Request $request |
315 | 315 | * @return View|void |
316 | 316 | */ |
317 | - public function index($pageUrl, Request $request){ |
|
317 | + public function index($pageUrl, Request $request) { |
|
318 | 318 | |
319 | 319 | /** |
320 | 320 | * Clear sessions |
@@ -339,19 +339,19 @@ discard block |
||
339 | 339 | * @param Request $request |
340 | 340 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector |
341 | 341 | */ |
342 | - public function checkRecommmendation($id, Request $request){ |
|
342 | + public function checkRecommmendation($id, Request $request) { |
|
343 | 343 | |
344 | 344 | /** |
345 | 345 | * @todo Use validator |
346 | 346 | */ |
347 | - if(is_numeric($id)){ |
|
347 | + if (is_numeric($id)) { |
|
348 | 348 | |
349 | 349 | $recommendation = Recommendation::find($id); |
350 | 350 | |
351 | 351 | /** |
352 | 352 | * If exists, than remember |
353 | 353 | */ |
354 | - if(!empty($recommendation)){ |
|
354 | + if (!empty($recommendation)) { |
|
355 | 355 | Cache::forever('recommendation_id', $id); |
356 | 356 | } |
357 | 357 | } |
@@ -19,7 +19,6 @@ |
||
19 | 19 | /** |
20 | 20 | * Register any application authentication / authorization services. |
21 | 21 | * |
22 | - * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
|
23 | 22 | * @return void |
24 | 23 | */ |
25 | 24 | public function boot() |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace App\Providers; |
4 | 4 | |
5 | -use Illuminate\Contracts\Auth\Access\Gate as GateContract; |
|
6 | 5 | use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; |
7 | 6 | |
8 | 7 | class AuthServiceProvider extends ServiceProvider |
@@ -21,7 +21,6 @@ |
||
21 | 21 | /** |
22 | 22 | * Register any other events for your application. |
23 | 23 | * |
24 | - * @param \Illuminate\Contracts\Events\Dispatcher $events |
|
25 | 24 | * @return void |
26 | 25 | */ |
27 | 26 | public function boot() |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace App\Providers; |
4 | 4 | |
5 | -use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; |
|
6 | 5 | use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; |
7 | 6 | |
8 | 7 | class EventServiceProvider extends ServiceProvider |
@@ -19,7 +19,6 @@ |
||
19 | 19 | /** |
20 | 20 | * Define your route model bindings, pattern filters, etc. |
21 | 21 | * |
22 | - * @param \Illuminate\Routing\Router $router |
|
23 | 22 | * @return void |
24 | 23 | */ |
25 | 24 | public function boot() |
@@ -63,9 +63,9 @@ |
||
63 | 63 | protected function create(array $data) |
64 | 64 | { |
65 | 65 | return User::create([ |
66 | - 'name' => $data['name'], |
|
67 | - 'email' => $data['email'], |
|
68 | - 'password' => bcrypt($data['password']), |
|
66 | + 'name' => $data[ 'name' ], |
|
67 | + 'email' => $data[ 'email' ], |
|
68 | + 'password' => bcrypt($data[ 'password' ]), |
|
69 | 69 | ]); |
70 | 70 | } |
71 | 71 | } |
72 | 72 | \ No newline at end of file |
@@ -35,6 +35,6 @@ |
||
35 | 35 | */ |
36 | 36 | public function __construct() |
37 | 37 | { |
38 | - $this->middleware('guest', ['except' => 'logout']); |
|
38 | + $this->middleware('guest', [ 'except' => 'logout' ]); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | \ No newline at end of file |
@@ -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 |