status = $httpStatusCode; } public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(Request $request) { switch($this->method()) { case 'POST': $rules = [ 'logo' => 'image', 'gps' => 'string', 'contact_email_address_mobile' => 'email', 'contact_number_mobile' => 'numeric', 'contact_email' => 'email', 'sys_add_contact_number' => 'numeric', ]; return $rules; case 'PUT': return $rules; default: } } public function response(array $errors) { return $this->status->unprocessableEntity('Form Error',$errors); } } ?>