1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-27 13:00:23 +08:00
2020-12-05 18:12:11 +08:00

27 lines
478 B
PHP

<?php
namespace App\Services\Logic\User\Console;
use App\Services\Logic\Service;
use App\Validators\Connect as ConnectValidator;
class ConnectDelete extends Service
{
public function handle($id)
{
$user = $this->getLoginUser();
$validator = new ConnectValidator();
$connect = $validator->checkConnect($id);
$validator->checkOwner($user->id, $connect->user_id);
$connect->deleted = 1;
$connect->update();
}
}