status = $httpStatusCode; } public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(Request $request) { $rules = [ 'fueltype_id' => 'required|numeric', 'date' => 'required|date_format:Y-m-d', 'kml' => 'required|numeric', 'km' => 'required|numeric', 'price' => 'required|numeric', 'liters' => 'required|numeric', 'total' => 'required|numeric' ]; return $rules; } public function response(array $errors) { return $this->status->unprocessableEntity('Form Validation Error',$errors); } } ?>