app/Http/Requests/PeliculaRequest.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()
    {
        $maxAnio=date('Y');
        return [
            'titulo'=>'required|string|max:30',
            'duracion'=>'required|integer|min:50|max:500',
            'anio'=>'required|integer|min:1970|max:'.$maxAnio,
            'idGenero' => 'nullable|array'
        ];
    }
public function rules ( ) { $ maxAnio = date ( 'Y' ) ; return [ 'titulo' => 'required|string|max:30' , 'duracion' => 'required|integer|min:50|max:500' , 'anio' => 'required|integer|min:1970|max:' . $ maxAnio , 'idGenero' => 'nullable|array' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .
//'titulo'=>'required|string|max:30|unique:peliculas',