*/ protected $guarded = [ 'id' ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; /** * The attributes that should be cast. * * @var array */ public function payments() { return $this->hasMany(Payment::class, 'user_id', 'id'); } public function wallet() { return $this->hasOne(Wallet::class, 'user_id', 'id'); } }