public function request(Request $request){
//1.取值
//echo $request->input('name');
//echo $request->input('sex','未知');
/*if($request->has('name')){
echo $request->input('name');
}else{
echo '无该参数';
}*/
//获取所有的参数
/*$res = $request->all();
dd($res);*/
//2.判断请求类型
/*echo $request->method();
if($request->isMethod('post')){
echo 'Yes';
}else{
echo 'No';
}*/
//判断是不是ajax请求
/*$res = $request->ajax();
var_dump($res);*/
//判读请求的路径
/*$res = $request->is('User/*');
var_dump($res);*/
//获取当前的url
//echo $request->url();
}