Total Complexity | 6 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class Player extends Model |
||
8 | { |
||
9 | |||
10 | protected $fillable = ['facebook_id', 'gamecenter_id', 'playgames_id', 'udid', 'name', 'ip']; |
||
11 | |||
12 | protected $hidden = ['created_at', 'updated_at']; |
||
13 | |||
14 | public function games() |
||
15 | { |
||
16 | return $this->belongsToMany(Game::class); |
||
17 | } |
||
18 | |||
19 | public static function findByName($nameId) |
||
20 | { |
||
21 | return SELF::where('name', $nameId)->first(); |
||
22 | } |
||
23 | |||
24 | public static function findByFacebookId($fbId) |
||
27 | } |
||
28 | |||
29 | public static function findByGameCenterId($gcId) |
||
32 | } |
||
33 | |||
34 | public static function findByPlayGamesId($pgId) |
||
37 | } |
||
38 | |||
39 | public static function findByUdid($udid) |
||
42 | } |
||
43 | |||
44 | } |