authorize()
authorize() : boolean
Determine if the user is authorized to make this request.
<?php
/**
* JingYao-backend
*
* @link https://gitee.com/wang-zhihui-release/jingyao-backend
* @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
*/
namespace App\Http\Requests;
use App\Rules\AssessCreateRule;
use App\Rules\AssessTemplateRulesCreateRule;
class CreateAssessTemplateRequest extends CommonRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'assess_template' => ['required', new AssessCreateRule()],
'assess_template_rules' => ['required', new AssessTemplateRulesCreateRule()],
];
}
}