1、获取全部参数的值
<?php use app\Request; public function index(Request $request){ $data = $request->param() } ?>
2、获取排除某些字段的值,即获取其他值
<?php use app\Request; public function index(Request $request){ $data = $request->except(['serverToken','loginToken']); } ?>
3、获取指定字段的值,即获取本次指定的值
<?php use app\Request; public function index(Request $request){ $data = $request->only(['serverToken','loginToken']); } ?>
文章评论(0)