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