tp获取参数的方式
获取参数类型转换
$this->reuqest->param('abc',1,'intval')
<?php namespace app\controller; use app\BaseController; use think\Request; use think\facade\Request as R; class Learn extends BaseController { public function index(Request $request) { dump($request->param()); } public function index1() { dump(R::param()); } public function index2() { dump(input()); } public function index3() { dump(request()->param()); } public function index4() { dump($this->request->param()); } }