hasOne(AgentUser::class, 'id', 'agent_id'); } public function employee() { return $this->hasOne(Employee::class, 'id', 'empid'); } public function user() { return $this->hasOne(User::class, 'id', 'uid'); } public function customer() { return $this->hasMany(Customer::class, 'agents_id', 'id'); } }