getKey(); } /** * Return a key value array, containing any custom claims to be added to the JWT. * * @return array */ public function getJWTCustomClaims() { return []; } /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'name', 'username', 'password', 'openid', 'balance', 'mobile','head_img_url' ]; /** * The attributes that should be hidden for arrays. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; /** * The attributes that should be cast to native types. * * @var array */ protected $casts = [ 'verified_at' => 'datetime', ]; public function patients() { return $this->hasMany(Patient::class, "customer_id"); } public function balances() { return $this->hasMany(Balance::class, "customer_id"); } public function oneBalance() { return $this->hasOne(Balance::class, "customer_id"); } public function recharges() { return $this->hasMany(Recharge::class, "customer_id")->whereNotNull("paid_at"); } public function orders() { return $this->hasMany(Orders::class, "customer_id"); } }