protected function track(?int $typeId = null, ?int $itemId = null, int $flag = 0, $data = null, $user = null)
    {
        // Login event
        // Add request url

        $this->writer->register([
            'user'          => $this->getUserId($user),
            'type'          => $this->type,
            'typeId'        => $typeId,
            'itemId'        => $itemId,
            'flagLevel'     => $flag,
            'data'          => $data,
        ]);
    }
protected function track(?int $typeId = null, ?int $itemId = null, int $flag = 0, $data = null, $user = null)
    {
        // Login event
        // Add request url

        $this->writer->register([
            'user'          => $this->getUserId($user),
            'type'          => $this->type,
            'typeId'        => $typeId,
            'itemId'        => $itemId,
            'flagLevel'     => $flag,
            'data'          => $data,
        ]);
    }
protected function track ( ? int $ typeId = null , ? int $ itemId = null , int $ flag = 0 , $ data = null , $ user = null ) { // Login event // Add request url $ this -> writer -> register ( [ 'user' => $ this -> getUserId ( $ user ) , 'type' => $ this -> type , 'typeId' => $ typeId , 'itemId' => $ itemId , 'flagLevel' => $ flag , 'data' => $ data , ] ) ; }
Track the event

@param int                                                   $typeId
@param int                                                   $itemId
@param int                                                   $flag
@param string|array                                          $data
@param int|\Illuminate\Contracts\Auth\Authenticatable|null   $user
Track the event