fetchesCompany = $fetchesCompany; } /** * @param CompanyConnectionObject $object * @return mixed * @throws \App\Classes\Exceptions\MalformedRequestException */ public function execute(CompanyConnectionObject $object) { $companyModule = $this->fetchesCompany->execute(['id', 1])->companyModules()->first(); $connection = new CompanyConnection(); $connection->inviter_id = $companyModule->id; $connection->invitee_id = $object->getInvitee()->id; $connection->inviter_reference = $object->getInviterReference(); $connection->invitee_reference = $object->getInviteeReference(); return $this->handler($connection); } }