mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-26 20:52:44 +08:00
25 lines
499 B
PHP
25 lines
499 B
PHP
<?php
|
|
|
|
namespace App\Services\Frontend\Im;
|
|
|
|
use App\Services\Frontend\Service as FrontendService;
|
|
use App\Validators\ImFriendUser as ImFriendUserValidator;
|
|
|
|
class ImFriendDelete extends FrontendService
|
|
{
|
|
|
|
public function handle($id)
|
|
{
|
|
$user = $this->getLoginUser();
|
|
|
|
$validator = new ImFriendUserValidator();
|
|
|
|
$friend = $validator->checkFriend($id);
|
|
|
|
$friendUser = $validator->checkFriendUser($user->id, $friend->id);
|
|
|
|
$friendUser->delete();
|
|
}
|
|
|
|
}
|