Total Complexity | 5 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class LeaderboardScore extends Model |
||
9 | { |
||
10 | |||
11 | protected $guarded = []; |
||
12 | protected $hidden = ['leaderboard_timescope_id', 'player', 'created_at', 'updated_at']; |
||
13 | protected $appends = ['name']; |
||
14 | |||
15 | public static function find($leaderbarodTimescopeId, $playerId) |
||
16 | { |
||
17 | return SELF::where('leaderboard_timescope_id', $leaderbarodTimescopeId)->where('player_id', $playerId)->first(); |
||
18 | } |
||
19 | |||
20 | public function timescope() |
||
21 | { |
||
22 | return $this->belongsTo(LeaderboardTimescope::class); |
||
23 | } |
||
24 | |||
25 | public function player() |
||
28 | } |
||
29 | |||
30 | public function getNameAttribute() |
||
39 | } |