app/Http/Requests/Evaluation/StoreEvaluationRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'questionnaire_id' => ['required', 'exists:questionnaires,id'],
            'answers.*.question_id' => ['required', 'exists:questions,id'],
            'answers.*.option_id' => ['required', 'exists:options,id'],
        ];
    }
public function rules ( ) { return [ 'questionnaire_id' => [ 'required' , 'exists:questionnaires,id' ] , 'answers.*.question_id' => [ 'required' , 'exists:questions,id' ] , 'answers.*.option_id' => [ 'required' , 'exists:options,id' ] , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .