SignOutController.class.php 713 Bytes
<?php
/**
 * Created by PhpStorm.
 * User: yingcai
 * Date: 2018/1/17
 * Time: 下午5:30
 */

namespace Apicp\Controller\LiveRoom;

use Com\Cookie;
use Think\Cache\Driver\Redis;

class SignOutController extends AbstractController
{
    protected $requireLogin = false;
    /**
     * SignOutRoom
     * @author houyingcai
     * @desc 退出直播间接口
     * @param Int lm_id:true:1 直播活动ID
     * @return array|bool
     */
    public function Index()
    {
        // 删除redis信息
        $redisServ = new Redis();
        $redisServ->rm($this->studioDetail['stream_id']);

        // 删除cookie
        $this->_cookie->remove($this->studioDetail['stream_id']);

        return true;
    }
}