1 | <?php |
||
12 | class SocialConnection extends Model |
||
13 | { |
||
14 | |||
15 | protected $table = 'social_connections'; |
||
16 | |||
17 | protected $fillable = ['provider', 'user_id', 'social_id', 'oauth_version', 'data']; |
||
18 | |||
19 | protected $casts = [ |
||
20 | 'data' => 'json' |
||
21 | ]; |
||
22 | |||
23 | /** |
||
24 | * The users model name. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected static $userModel = 'LGL\Core\Auth\Users\EloquentUser'; |
||
29 | |||
30 | |||
31 | public function user() |
||
35 | |||
36 | |||
37 | public function scopeOfProvider($query, $provider) |
||
41 | |||
42 | |||
43 | public function scopeOfProviderId($query, $socialId) |
||
47 | |||
48 | |||
49 | public function scopeOfCredentials($query, $provider, $socialId) |
||
53 | |||
54 | |||
55 | public function getUser() |
||
59 | |||
60 | |||
61 | /** |
||
62 | * @param $user |
||
63 | */ |
||
64 | public function setUser($user) |
||
70 | |||
71 | |||
72 | /** |
||
73 | * Get the users model. |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | public static function getUsersModel() |
||
81 | |||
82 | |||
83 | /** |
||
84 | * Set the users model. |
||
85 | * |
||
86 | * @param string $usersModel |
||
87 | * |
||
88 | * @return void |
||
89 | */ |
||
90 | 27 | public static function setUsersModel($usersModel) |
|
94 | |||
95 | } |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.