| Total Complexity | 6 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Player extends Model |
||
| 8 | { |
||
| 9 | |||
| 10 | protected $fillable = ['facebook_id', 'gamecenter_id', 'playgames_id', 'udid', 'name', 'ip']; |
||
| 11 | |||
| 12 | public function games() |
||
| 13 | { |
||
| 14 | return $this->hasMany('App\PlayerGame'); |
||
| 15 | } |
||
| 16 | |||
| 17 | public static function findByName($nameId) |
||
| 18 | { |
||
| 19 | return SELF::where('name', $nameId)->first(); |
||
| 20 | } |
||
| 21 | |||
| 22 | public static function findByFacebookId($fbId) |
||
| 25 | } |
||
| 26 | |||
| 27 | public static function findByGameCenterId($gcId) |
||
| 30 | } |
||
| 31 | |||
| 32 | public static function findByPlayGamesId($pgId) |
||
| 35 | } |
||
| 36 | |||
| 37 | public static function findByUdid($udid) |
||
| 40 | } |
||
| 41 | } |
||
| 42 |