<?php

namespace App\Http\Middleware;

use Closure;
use App\Api\Common\Common;
class CheckParam
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {

        if(empty($request->all())){
            return response()->json(Common::error('1001'));
        }
        return $next($request);
    }
}
