1 | <?php |
||
15 | class SocialUser extends Model |
||
16 | { |
||
17 | use UserModel; |
||
18 | |||
19 | /** |
||
20 | * The attributes that are mass assignable. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $fillable = [ |
||
25 | 'user_id', 'social_id', 'social_type','nickname','name','email','avatar','meta' |
||
26 | ]; |
||
27 | |||
28 | /** |
||
29 | * Get the user that owns the social user. |
||
30 | */ |
||
31 | public function user() |
||
35 | |||
36 | /** |
||
37 | * Dynamically retrieve attributes on the model. |
||
38 | * |
||
39 | * @param string $key |
||
40 | * @return mixed |
||
41 | */ |
||
42 | public function __get($key) |
||
49 | |||
50 | /** |
||
51 | * Get an attribute from the meta field. |
||
52 | * |
||
53 | * @param string $key |
||
54 | * @return mixed |
||
55 | */ |
||
56 | public function getAttributeFromMeta($key) |
||
79 | } |
||
80 |