@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | public function view(Association $association) { |
| 30 | - return view('association.view', ['association' => $association]); |
|
| 30 | + return view('association.view', [ 'association' => $association ]); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function edit(Association $association) { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | public function home() { |
| 49 | 49 | if (!empty($this->association)) { |
| 50 | - return view('association.home', ['association' => $this->association]); |
|
| 50 | + return view('association.home', [ 'association' => $this->association ]); |
|
| 51 | 51 | } |
| 52 | 52 | else { |
| 53 | 53 | abort(404); |
@@ -55,35 +55,35 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | public function divisions(Association $association) { |
| 58 | - return view('association.divisions', ['association' => $association]); |
|
| 58 | + return view('association.divisions', [ 'association' => $association ]); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | public function teams(Association $association) { |
| 62 | - return view('association.teams', ['association' => $association]); |
|
| 62 | + return view('association.teams', [ 'association' => $association ]); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | public function venues(Association $association) { |
| 66 | - return view('association.venues', ['association' => $association]); |
|
| 66 | + return view('association.venues', [ 'association' => $association ]); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | public function series(Association $association) { |
| 70 | - return view('association.series', ['association' => $association]); |
|
| 70 | + return view('association.series', [ 'association' => $association ]); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | public function users(Association $association) { |
| 74 | - return view('association.users', ['association' => $association]); |
|
| 74 | + return view('association.users', [ 'association' => $association ]); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | public function viewUser(Association $association, User $user) { |
| 78 | - return view('association.user.view', ['association' => $association, 'user' => $user]); |
|
| 78 | + return view('association.user.view', [ 'association' => $association, 'user' => $user ]); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | public function editUser(Association $association, User $user) { |
| 82 | - return view('association.user.edit', ['association' => $association, 'user' => $user]); |
|
| 82 | + return view('association.user.edit', [ 'association' => $association, 'user' => $user ]); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | public function userToken(Association $association, User $user) { |
| 86 | - return view('association.user.token', ['association' => $association, 'user' => $user]); |
|
| 86 | + return view('association.user.token', [ 'association' => $association, 'user' => $user ]); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | public function userTokenRefresh(Association $association, User $user) { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | 'api_token' => hash('sha256', $token), |
| 94 | 94 | ])->save(); |
| 95 | 95 | |
| 96 | - return view('association.user.token-refresh', ['association' => $association, 'user' => $user, 'token' => $token]); |
|
| 96 | + return view('association.user.token-refresh', [ 'association' => $association, 'user' => $user, 'token' => $token ]); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | public function updateUser(Request $request, Association $association, User $user) { |
@@ -113,12 +113,12 @@ discard block |
||
| 113 | 113 | return redirect($url)->with('success', 'Data saved successfully!'); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - return redirect()->route('user', ['id' => \Auth::user()->id]); |
|
| 116 | + return redirect()->route('user', [ 'id' => \Auth::user()->id ]); |
|
| 117 | 117 | |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | public function addUser(Association $association) { |
| 121 | - return view('association.user.add', ['association' => $association]); |
|
| 121 | + return view('association.user.add', [ 'association' => $association ]); |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | public function submitScoreBegin(Request $request) { |
@@ -130,13 +130,13 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | // get rounds with start_date < today, but greater than today - 1 week |
| 132 | 132 | $rounds = Round::whereIn('schedule_id', $schedules->pluck('id')) |
| 133 | - ->where('start_date','>=', date('Y-m-d', strtotime('-1 week'))) |
|
| 133 | + ->where('start_date', '>=', date('Y-m-d', strtotime('-1 week'))) |
|
| 134 | 134 | ->where('start_date', '<=', date('Y-m-d', strtotime("today")))->get(); |
| 135 | 135 | |
| 136 | 136 | $divisions = Division::whereIn('id', $rounds->pluck('division_id'))->get(); |
| 137 | 137 | |
| 138 | 138 | if (count($divisions) === 1) { |
| 139 | - $request->division_id = $divisions[0]->id; |
|
| 139 | + $request->division_id = $divisions[ 0 ]->id; |
|
| 140 | 140 | |
| 141 | 141 | return $this->submitScoreStep2($request); |
| 142 | 142 | } |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | $rounds = Round::whereIn('schedule_id', $schedules->pluck('id')) |
| 167 | 167 | ->where('start_date', '>=', date('Y-m-d', strtotime('-1 week'))) |
| 168 | 168 | ->where('start_date', '<=', date('Y-m-d', strtotime("today"))) |
| 169 | - ->where(function ($query) { |
|
| 169 | + ->where(function($query) { |
|
| 170 | 170 | $query->where('scores_closed', 0); |
| 171 | 171 | $query->orWhereNull('scores_closed'); |
| 172 | 172 | }) |
@@ -265,11 +265,11 @@ discard block |
||
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | public function standings() { |
| 268 | - return view('association.standings', ['association' => $this->association]); |
|
| 268 | + return view('association.standings', [ 'association' => $this->association ]); |
|
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | public function schedule() { |
| 272 | - return view('association.schedule', ['association' => $this->association]); |
|
| 272 | + return view('association.schedule', [ 'association' => $this->association ]); |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | public function css() { |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | $association->save(); |
| 295 | 295 | |
| 296 | 296 | // TODO: Do not necessarily "onboard" for certain roles? |
| 297 | - return redirect()->route('onboard.association', ['association' => $association]); |
|
| 297 | + return redirect()->route('onboard.association', [ 'association' => $association ]); |
|
| 298 | 298 | } |
| 299 | 299 | else { |
| 300 | 300 | return view('denied'); |
@@ -340,13 +340,13 @@ discard block |
||
| 340 | 340 | return redirect($url)->with('success', 'Data saved successfully!'); |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | - return redirect()->route('user', ['id' => \Auth::user()->id]); |
|
| 343 | + return redirect()->route('user', [ 'id' => \Auth::user()->id ]); |
|
| 344 | 344 | |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | public function create() { |
| 348 | 348 | if (Bouncer::can('create', Association::class)) { |
| 349 | - return view('association.create', ['current_user' => \Auth::user()]); |
|
| 349 | + return view('association.create', [ 'current_user' => \Auth::user() ]); |
|
| 350 | 350 | } |
| 351 | 351 | else { |
| 352 | 352 | return view('denied'); |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | public function deleteConfirm(Association $association) { |
| 357 | - return view('association.delete', ['association' => $association]); |
|
| 357 | + return view('association.delete', [ 'association' => $association ]); |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | public function delete(Association $association) { |
@@ -364,21 +364,21 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | public function undeleteConfirm(Association $association) { |
| 367 | - return view('association.undelete', ['association' => $association]); |
|
| 367 | + return view('association.undelete', [ 'association' => $association ]); |
|
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | public function undelete(Association $association) { |
| 371 | 371 | $association->restore(); |
| 372 | 372 | |
| 373 | - return redirect()->route('user', ['user' => \Auth::user()])->with('success', 'Association restored successfully.'); |
|
| 373 | + return redirect()->route('user', [ 'user' => \Auth::user() ])->with('success', 'Association restored successfully.'); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | public function about() { |
| 377 | - return view('association.about' , ['association' => $this->association]); |
|
| 377 | + return view('association.about', [ 'association' => $this->association ]); |
|
| 378 | 378 | } |
| 379 | 379 | |
| 380 | 380 | public function rules() { |
| 381 | - return view('association.rules' , ['association' => $this->association]); |
|
| 381 | + return view('association.rules', [ 'association' => $this->association ]); |
|
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | public function rulesDelete(Association $association) { |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | public function contact() { |
| 396 | - return view('forms.contact', ['association' => $this->association]); |
|
| 396 | + return view('forms.contact', [ 'association' => $this->association ]); |
|
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 | public function contactSubmit(Request $request) { |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | */ |
| 425 | 425 | public function contactSubmissions(Association $association) |
| 426 | 426 | { |
| 427 | - return view('association.contact_submissions', ['association' => $association]); |
|
| 427 | + return view('association.contact_submissions', [ 'association' => $association ]); |
|
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | } |