@@ -6,18 +6,18 @@ |
||
6 | 6 | protected $fillable = ['player_id', 'hole_id', 'match_id', 'money']; |
7 | 7 | |
8 | 8 | public function match() |
9 | - { |
|
10 | - return $this->belongsTo('Match'); |
|
11 | - } |
|
9 | + { |
|
10 | + return $this->belongsTo('Match'); |
|
11 | + } |
|
12 | 12 | |
13 | - public function player() |
|
14 | - { |
|
15 | - return $this->belongsTo('Player'); |
|
16 | - } |
|
13 | + public function player() |
|
14 | + { |
|
15 | + return $this->belongsTo('Player'); |
|
16 | + } |
|
17 | 17 | |
18 | - public function hole() |
|
19 | - { |
|
20 | - return $this->belongsTo('Hole'); |
|
21 | - } |
|
18 | + public function hole() |
|
19 | + { |
|
20 | + return $this->belongsTo('Hole'); |
|
21 | + } |
|
22 | 22 | |
23 | 23 | } |
24 | 24 | \ No newline at end of file |
@@ -1,12 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class Ctp extends Eloquent |
|
4 | -{ |
|
3 | +class Ctp extends Eloquent { |
|
5 | 4 | protected $guarded = ['id']; |
6 | 5 | protected $fillable = ['player_id', 'hole_id', 'match_id', 'money']; |
7 | 6 | |
8 | 7 | public function match() |
9 | - { |
|
8 | + { |
|
10 | 9 | return $this->belongsTo('Match'); |
11 | 10 | } |
12 | 11 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | public function holescores() |
12 | 12 | { |
13 | - return $this->hasManyThrough('Holescore','Round'); |
|
13 | + return $this->hasManyThrough('Holescore', 'Round'); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | public function skins() |
@@ -1,10 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class Player extends Eloquent |
|
4 | -{ |
|
3 | +class Player extends Eloquent { |
|
5 | 4 | |
6 | 5 | public function rounds() |
7 | - { |
|
6 | + { |
|
8 | 7 | return $this->hasMany('Round'); |
9 | 8 | } |
10 | 9 | |
@@ -14,17 +13,17 @@ discard block |
||
14 | 13 | } |
15 | 14 | |
16 | 15 | public function skins() |
17 | - { |
|
16 | + { |
|
18 | 17 | return $this->hasMany('Skin'); |
19 | 18 | } |
20 | 19 | |
21 | 20 | public function winners() |
22 | - { |
|
21 | + { |
|
23 | 22 | return $this->hasMany('Winner'); |
24 | 23 | } |
25 | 24 | |
26 | 25 | public function matches() |
27 | - { |
|
26 | + { |
|
28 | 27 | return $this->belongsToMany('Match')->withPivot('level_id', 'group', 'handicap', 'winnings')->withTimestamps(); |
29 | 28 | } |
30 | 29 |
@@ -4,9 +4,9 @@ discard block |
||
4 | 4 | { |
5 | 5 | |
6 | 6 | public function rounds() |
7 | - { |
|
8 | - return $this->hasMany('Round'); |
|
9 | - } |
|
7 | + { |
|
8 | + return $this->hasMany('Round'); |
|
9 | + } |
|
10 | 10 | |
11 | 11 | public function holescores() |
12 | 12 | { |
@@ -14,23 +14,23 @@ discard block |
||
14 | 14 | } |
15 | 15 | |
16 | 16 | public function skins() |
17 | - { |
|
18 | - return $this->hasMany('Skin'); |
|
19 | - } |
|
17 | + { |
|
18 | + return $this->hasMany('Skin'); |
|
19 | + } |
|
20 | 20 | |
21 | 21 | public function winners() |
22 | - { |
|
23 | - return $this->hasMany('Winner'); |
|
24 | - } |
|
22 | + { |
|
23 | + return $this->hasMany('Winner'); |
|
24 | + } |
|
25 | 25 | |
26 | 26 | public function matches() |
27 | - { |
|
28 | - return $this->belongsToMany('Match')->withPivot('level_id', 'group', 'handicap', 'winnings')->withTimestamps(); |
|
29 | - } |
|
30 | - |
|
31 | - public function teams() |
|
32 | - { |
|
33 | - return $this->hasMany('Team'); |
|
34 | - } |
|
27 | + { |
|
28 | + return $this->belongsToMany('Match')->withPivot('level_id', 'group', 'handicap', 'winnings')->withTimestamps(); |
|
29 | + } |
|
30 | + |
|
31 | + public function teams() |
|
32 | + { |
|
33 | + return $this->hasMany('Team'); |
|
34 | + } |
|
35 | 35 | |
36 | 36 | } |
@@ -2,16 +2,16 @@ |
||
2 | 2 | |
3 | 3 | class Holescore extends Eloquent { |
4 | 4 | |
5 | - protected $guarded = ['id']; |
|
6 | - protected $fillable = ['score', 'hole_id', 'round_id']; |
|
5 | + protected $guarded = ['id']; |
|
6 | + protected $fillable = ['score', 'hole_id', 'round_id']; |
|
7 | 7 | |
8 | - public function round() |
|
9 | - { |
|
10 | - return $this->belongsTo('Round'); |
|
11 | - } |
|
8 | + public function round() |
|
9 | + { |
|
10 | + return $this->belongsTo('Round'); |
|
11 | + } |
|
12 | 12 | |
13 | 13 | public function hole() |
14 | - { |
|
15 | - return $this->belongsTo('Hole'); |
|
16 | - } |
|
14 | + { |
|
15 | + return $this->belongsTo('Hole'); |
|
16 | + } |
|
17 | 17 | } |
18 | 18 | \ No newline at end of file |
@@ -11,7 +11,7 @@ |
||
11 | 11 | } |
12 | 12 | |
13 | 13 | public function hole() |
14 | - { |
|
14 | + { |
|
15 | 15 | return $this->belongsTo('Hole'); |
16 | 16 | } |
17 | 17 | } |
18 | 18 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | class Level extends Eloquent { |
4 | 4 | |
5 | 5 | public function skins() |
6 | - { |
|
7 | - return $this->hasMany('Skin'); |
|
8 | - } |
|
6 | + { |
|
7 | + return $this->hasMany('Skin'); |
|
8 | + } |
|
9 | 9 | } |
10 | 10 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | class Level extends Eloquent { |
4 | 4 | |
5 | 5 | public function skins() |
6 | - { |
|
6 | + { |
|
7 | 7 | return $this->hasMany('Skin'); |
8 | 8 | } |
9 | 9 | } |
10 | 10 | \ No newline at end of file |
@@ -1,41 +1,40 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class Match extends Eloquent |
|
4 | -{ |
|
3 | +class Match extends Eloquent { |
|
5 | 4 | protected $table = 'matches'; |
6 | 5 | |
7 | 6 | public function setDateAttribute($date) |
8 | - { |
|
7 | + { |
|
9 | 8 | $this->attributes['date'] = date('Y-m-d', strtotime(str_replace('-', '/', $date))); |
10 | 9 | } |
11 | 10 | |
12 | 11 | public function course() |
13 | - { |
|
12 | + { |
|
14 | 13 | return $this->belongsTo('Course'); |
15 | 14 | } |
16 | 15 | |
17 | 16 | public function season() |
18 | - { |
|
17 | + { |
|
19 | 18 | return $this->belongsTo('Season'); |
20 | 19 | } |
21 | 20 | |
22 | 21 | public function winners() |
23 | - { |
|
22 | + { |
|
24 | 23 | return $this->hasMany('Winner'); |
25 | 24 | } |
26 | 25 | |
27 | 26 | public function money() |
28 | - { |
|
27 | + { |
|
29 | 28 | return $this->hasMany('Money'); |
30 | 29 | } |
31 | 30 | |
32 | 31 | public function skins() |
33 | - { |
|
32 | + { |
|
34 | 33 | return $this->hasMany('Skin'); |
35 | 34 | } |
36 | 35 | |
37 | 36 | public function players() |
38 | - { |
|
37 | + { |
|
39 | 38 | return $this->belongsToMany('Player')->withPivot('level_id', 'group', 'handicap', 'winnings')->orderBy('pivot_winnings', 'desc')->withTimestamps(); |
40 | 39 | } |
41 | 40 |
@@ -5,44 +5,44 @@ discard block |
||
5 | 5 | protected $table = 'matches'; |
6 | 6 | |
7 | 7 | public function setDateAttribute($date) |
8 | - { |
|
8 | + { |
|
9 | 9 | $this->attributes['date'] = date('Y-m-d', strtotime(str_replace('-', '/', $date))); |
10 | - } |
|
10 | + } |
|
11 | 11 | |
12 | 12 | public function course() |
13 | - { |
|
14 | - return $this->belongsTo('Course'); |
|
15 | - } |
|
13 | + { |
|
14 | + return $this->belongsTo('Course'); |
|
15 | + } |
|
16 | 16 | |
17 | 17 | public function season() |
18 | - { |
|
19 | - return $this->belongsTo('Season'); |
|
20 | - } |
|
18 | + { |
|
19 | + return $this->belongsTo('Season'); |
|
20 | + } |
|
21 | 21 | |
22 | 22 | public function winners() |
23 | - { |
|
24 | - return $this->hasMany('Winner'); |
|
25 | - } |
|
23 | + { |
|
24 | + return $this->hasMany('Winner'); |
|
25 | + } |
|
26 | 26 | |
27 | 27 | public function money() |
28 | - { |
|
29 | - return $this->hasMany('Money'); |
|
30 | - } |
|
28 | + { |
|
29 | + return $this->hasMany('Money'); |
|
30 | + } |
|
31 | 31 | |
32 | 32 | public function skins() |
33 | - { |
|
34 | - return $this->hasMany('Skin'); |
|
35 | - } |
|
33 | + { |
|
34 | + return $this->hasMany('Skin'); |
|
35 | + } |
|
36 | 36 | |
37 | 37 | public function players() |
38 | - { |
|
39 | - return $this->belongsToMany('Player')->withPivot('level_id', 'group', 'handicap', 'winnings')->orderBy('pivot_winnings', 'desc')->withTimestamps(); |
|
40 | - } |
|
38 | + { |
|
39 | + return $this->belongsToMany('Player')->withPivot('level_id', 'group', 'handicap', 'winnings')->orderBy('pivot_winnings', 'desc')->withTimestamps(); |
|
40 | + } |
|
41 | 41 | |
42 | - public function playersEdit() |
|
43 | - { |
|
44 | - return $this->belongsToMany('Player')->withPivot('level_id', 'group', 'handicap', 'winnings')->orderBy('pivot_group', 'asc')->withTimestamps(); |
|
45 | - } |
|
42 | + public function playersEdit() |
|
43 | + { |
|
44 | + return $this->belongsToMany('Player')->withPivot('level_id', 'group', 'handicap', 'winnings')->orderBy('pivot_group', 'asc')->withTimestamps(); |
|
45 | + } |
|
46 | 46 | |
47 | 47 | public function rounds() |
48 | 48 | { |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | |
52 | 52 | public function holes() |
53 | 53 | { |
54 | - return $this->hasManyThrough('Hole', 'Course'); |
|
55 | - } |
|
54 | + return $this->hasManyThrough('Hole', 'Course'); |
|
55 | + } |
|
56 | 56 | |
57 | 57 | public function getAllMatches() |
58 | 58 | { |
@@ -3,22 +3,22 @@ |
||
3 | 3 | class Skin extends Eloquent { |
4 | 4 | |
5 | 5 | public function player() |
6 | - { |
|
7 | - return $this->belongsTo('Player'); |
|
8 | - } |
|
6 | + { |
|
7 | + return $this->belongsTo('Player'); |
|
8 | + } |
|
9 | 9 | |
10 | 10 | public function matches() |
11 | - { |
|
12 | - return $this->belongsTo('Match'); |
|
13 | - } |
|
11 | + { |
|
12 | + return $this->belongsTo('Match'); |
|
13 | + } |
|
14 | 14 | |
15 | 15 | public function level() |
16 | - { |
|
17 | - return $this->belongsTo('Level'); |
|
18 | - } |
|
16 | + { |
|
17 | + return $this->belongsTo('Level'); |
|
18 | + } |
|
19 | 19 | |
20 | 20 | public function hole() |
21 | - { |
|
22 | - return $this->belongsTo('Hole'); |
|
23 | - } |
|
21 | + { |
|
22 | + return $this->belongsTo('Hole'); |
|
23 | + } |
|
24 | 24 | } |
25 | 25 | \ No newline at end of file |
@@ -3,22 +3,22 @@ |
||
3 | 3 | class Skin extends Eloquent { |
4 | 4 | |
5 | 5 | public function player() |
6 | - { |
|
6 | + { |
|
7 | 7 | return $this->belongsTo('Player'); |
8 | 8 | } |
9 | 9 | |
10 | 10 | public function matches() |
11 | - { |
|
11 | + { |
|
12 | 12 | return $this->belongsTo('Match'); |
13 | 13 | } |
14 | 14 | |
15 | 15 | public function level() |
16 | - { |
|
16 | + { |
|
17 | 17 | return $this->belongsTo('Level'); |
18 | 18 | } |
19 | 19 | |
20 | 20 | public function hole() |
21 | - { |
|
21 | + { |
|
22 | 22 | return $this->belongsTo('Hole'); |
23 | 23 | } |
24 | 24 | } |
25 | 25 | \ No newline at end of file |
@@ -3,13 +3,13 @@ |
||
3 | 3 | class Netwinner extends Eloquent { |
4 | 4 | |
5 | 5 | public function match() |
6 | - { |
|
7 | - return $this->belongsTo('Match'); |
|
8 | - } |
|
9 | - |
|
10 | - public function player() |
|
11 | - { |
|
12 | - return $this->belongsTo('Player'); |
|
13 | - } |
|
6 | + { |
|
7 | + return $this->belongsTo('Match'); |
|
8 | + } |
|
9 | + |
|
10 | + public function player() |
|
11 | + { |
|
12 | + return $this->belongsTo('Player'); |
|
13 | + } |
|
14 | 14 | |
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | class Netwinner extends Eloquent { |
4 | 4 | |
5 | 5 | public function match() |
6 | - { |
|
6 | + { |
|
7 | 7 | return $this->belongsTo('Match'); |
8 | 8 | } |
9 | 9 |
@@ -3,18 +3,18 @@ |
||
3 | 3 | class Point extends Eloquent |
4 | 4 | { |
5 | 5 | public function player() |
6 | - { |
|
7 | - return $this->belongsTo('Player'); |
|
8 | - } |
|
6 | + { |
|
7 | + return $this->belongsTo('Player'); |
|
8 | + } |
|
9 | 9 | |
10 | 10 | public function match() |
11 | - { |
|
12 | - return $this->belongsTo('Match'); |
|
13 | - } |
|
11 | + { |
|
12 | + return $this->belongsTo('Match'); |
|
13 | + } |
|
14 | 14 | |
15 | 15 | public function season() |
16 | - { |
|
17 | - return $this->hasManyThrough('Season', 'Match'); |
|
18 | - } |
|
16 | + { |
|
17 | + return $this->hasManyThrough('Season', 'Match'); |
|
18 | + } |
|
19 | 19 | |
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -1,19 +1,18 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class Point extends Eloquent |
|
4 | -{ |
|
3 | +class Point extends Eloquent { |
|
5 | 4 | public function player() |
6 | - { |
|
5 | + { |
|
7 | 6 | return $this->belongsTo('Player'); |
8 | 7 | } |
9 | 8 | |
10 | 9 | public function match() |
11 | - { |
|
10 | + { |
|
12 | 11 | return $this->belongsTo('Match'); |
13 | 12 | } |
14 | 13 | |
15 | 14 | public function season() |
16 | - { |
|
15 | + { |
|
17 | 16 | return $this->hasManyThrough('Season', 'Match'); |
18 | 17 | } |
19 | 18 |
@@ -1,6 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class Group extends Eloquent |
|
4 | -{ |
|
3 | +class Group extends Eloquent { |
|
5 | 4 | |
6 | 5 | } |
7 | 6 | \ No newline at end of file |