app/Http/Requests/ViajeRequest.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 [
          'codigo' => 'required|min:3|max:20|unique:viaje',
          'num_plaza' => 'required|min:1|max:20',
          'cod_destino' => 'required', 
          'cod_origen' => 'required',
          'precio' => 'required|min:3|max:20',
          'ced_viajero' => 'required',
        ];
    }
public function rules ( ) { return [ 'codigo' => 'required|min:3|max:20|unique:viaje' , 'num_plaza' => 'required|min:1|max:20' , 'cod_destino' => 'required' , 'cod_origen' => 'required' , 'precio' => 'required|min:3|max:20' , 'ced_viajero' => 'required' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .