mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
20 lines
530 B
PHP
20 lines
530 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Companies\Services;
|
|
|
|
use App\Classes\Modules\Companies\DataTransferObjects\ConnectionObject;
|
|
use App\Classes\ValueObjects\Constants\ConnectionStatus;
|
|
|
|
class CreatesCompanyConnection
|
|
{
|
|
|
|
public function execute(ConnectionObject $connection){
|
|
$connection->getInviter()->connections()->attach($connection->getInvitee(),
|
|
[
|
|
'status' => ConnectionStatus::APPROVED,
|
|
'instigator' => $connection->getInvitee()->id
|
|
]
|
|
);
|
|
}
|
|
|
|
} |