12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\SoftDeletes;
- use Illuminate\Foundation\Auth\User as Authuser;
- use Illuminate\Notifications\Notifiable;
- use Tymon\JWTAuth\Contracts\JWTSubject;
- use Illuminate\Foundation\Auth\User as Authenticatable;
- use Illuminate\Auth\MustVerifyEmail as MustVerifyEmailTrait;
- use Illuminate\Contracts\Auth\MustVerifyEmail as MustVerifyEmailContract;
- use Illuminate\Support\Facades\Auth;
- class User extends Authenticatable implements MustVerifyEmailContract, JWTSubject
- {
- use SoftDeletes;
- protected $connection = 'mysql';
-
- protected $fillable = [
- 'nickname','avatar','openid','unionid','tag','status','sex','mobile','auth_code','mobile_code'
- ];
-
- protected $hidden = [
- 'password'
- ];
-
- public function getJWTIdentifier()
- {
- return $this->getKey();
- }
-
- public function getJWTCustomClaims()
- {
- return [];
- }
-
- public function user_info()
- {
- return $this->belongsTo(User::class,'user_id');
- }
- }
|