<?php

namespace App\Http\Controllers\WapAlipay\User;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Modules\User\Models\BackActive;

class UserbehaviorController extends Controller
{

    /**
     * @apiDefine User 用户
     */


    /**
     * @apiVersion 1.0.0
     * @apiDescription 用户行为
     * @api {POST} userBehavior 用户行为
     * @apiGroup User
     * @apiName collectionBehavior
     * @apiParam {Number}  uid 用户ID.
     * @apiParam {String}  current_url 当前连接
     * @apiSuccessExample {json} Success-Response:
     *
     *     {
     *         "code": 0,
     *         "msg": "",
     *         "data": {
     *         }
     *     }
     */
    public function collectionBehavior(Request $request){
        $uid = $request->input('uid');
        $current_url = $request->input('current_url');
        if(empty($uid) || empty($current_url)){
        }else{
            BackActive::create(compact('uid','current_url'));
        }
        return response()->success();
    }
}
