【发布时间】:2020-07-27 21:53:00
【问题描述】:
我的 Laravel 控制器上有一个 index 方法,它接受一个可选的查询字符串参数。
这应该如何在方法的 PHPDoc 块中表示?
EmployerController.php:
/**
* @param Request $request
* @return Response
* Returns list of Employers
*/
public function index(Request $request) {
// This is the optional parameter which needs to be represented
// in the PHPDoc block
$collectiveAgreement = $request->query('collective_agreement');
...
}
【问题讨论】: