hasOne(Employee::class, 'id', 'agent_employee_id'); } public function user() { return $this->hasOne(User::class, 'id', 'uid'); } public function customer() { return $this->hasMany(Customer::class, 'agents_id', 'id'); } public function agenttype() { return $this->hasOne(AgentType::class, 'id', 'type'); } }