protected function resolveDynamicFormRequestErrors(Request $request)
	{
		try {
			$config = app('itemconfig');
			$fieldFactory = app('admin_field_factory');
		} catch (\ReflectionException $e) {
			return null;
		}
		if (array_key_exists('form_request', $config->getOptions())) {
			try {
				$model = $config->getFilledDataModel($request, $fieldFactory->getEditFields(), $request->id);

				$request->merge($model->toArray());
				$formRequestClass = $config->getOption('form_request');
				app($formRequestClass);
			} catch (HttpResponseException $e) {
				//Parses the exceptions thrown by Illuminate\Foundation\Http\FormRequest
				$errorMessages = $e->getResponse()->getContent();
				$errorsArray = json_decode($errorMessages);
				if (!$errorsArray && is_string ( $errorMessages )) {
					return $errorMessages;
				}
				if ($errorsArray) {
					return implode(".", array_dot($errorsArray));
				}
			}
		}
		return null;
	}
protected function resolveDynamicFormRequestErrors(Request $request)
	{
		try {
			$config = app('itemconfig');
			$fieldFactory = app('admin_field_factory');
		} catch (\ReflectionException $e) {
			return null;
		}
		if (array_key_exists('form_request', $config->getOptions())) {
			try {
				$model = $config->getFilledDataModel($request, $fieldFactory->getEditFields(), $request->id);

				$request->merge($model->toArray());
				$formRequestClass = $config->getOption('form_request');
				app($formRequestClass);
			} catch (HttpResponseException $e) {
				//Parses the exceptions thrown by Illuminate\Foundation\Http\FormRequest
				$errorMessages = $e->getResponse()->getContent();
				$errorsArray = json_decode($errorMessages);
				if (!$errorsArray && is_string ( $errorMessages )) {
					return $errorMessages;
				}
				if ($errorsArray) {
					return implode(".", array_dot($errorsArray));
				}
			}
		}
		return null;
	}
protected function resolveDynamicFormRequestErrors ( Request $ request ) { try { $ config = app ( 'itemconfig' ) ; $ fieldFactory = app ( 'admin_field_factory' ) ; } catch ( \ ReflectionException $ e ) { return null ; } if ( array_key_exists ( 'form_request' , $ config -> getOptions ( ) ) ) { try { $ model = $ config -> getFilledDataModel ( $ request , $ fieldFactory -> getEditFields ( ) , $ request -> id ) ; $ request -> merge ( $ model -> toArray ( ) ) ; $ formRequestClass = $ config -> getOption ( 'form_request' ) ; app ( $ formRequestClass ) ; } catch ( HttpResponseException $ e ) { //Parses the exceptions thrown by Illuminate\Foundation\Http\FormRequest $ errorMessages = $ e -> getResponse ( ) -> getContent ( ) ; $ errorsArray = json_decode ( $ errorMessages ) ; if ( ! $ errorsArray && is_string ( $ errorMessages ) ) { return $ errorMessages ; } if ( $ errorsArray ) { return implode ( "." , array_dot ( $ errorsArray ) ) ; } } } return null ; }
POST method to capture any form request errors

@param \Illuminate\Http\Request $request
POST method to capture any form request errors