Total Complexity | 3 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class PlayerGame extends Model |
||
8 | { |
||
9 | |||
10 | protected $fillable = ['player_id', 'game_id', 'is_online', 'channel', 'version', 'is_hack']; |
||
11 | |||
12 | public function player() |
||
13 | { |
||
14 | return $this->belongsTo('App\Player'); |
||
15 | } |
||
16 | |||
17 | public static function findByPlayerGame($playerId, $gameId) |
||
18 | { |
||
19 | return SELF::where('player_id', $playerId)->where('game_id', $gameId)->first(); |
||
20 | } |
||
21 | |||
22 | public static function getPlayers($gameId) |
||
25 | } |
||
26 | } |
||
27 |