Domain\Lesson\Http\Requests\UpdateRequest::rules PHP Method

rules() public method

Get the validation rules that apply to the request.
public rules ( ) : array
return array
    public function rules()
    {
        $id = $this->route('lesson');
        return ['name' => 'required|max:40|unique:lessons,name,' . $id . ',id', 'description' => 'max:65535'];
    }
UpdateRequest