Skip to content

Instantly share code, notes, and snippets.

@nonlocalize
Created February 21, 2015 02:06
Show Gist options
  • Save nonlocalize/b7fac8437b193c0a8efd to your computer and use it in GitHub Desktop.
Save nonlocalize/b7fac8437b193c0a8efd to your computer and use it in GitHub Desktop.
try
{
$this->newInvoice->insert($data, 'store');
}
catch(ValidationException $e){
$fixedInputs = Input::except($this->newInvoice->arrayInputs);
$arrayInputs = Input::only($this->newInvoice->arrayInputs);
$arrayInputs = Sort::getArrayInputs($arrayInputs);
return Redirect::back()
->withInput()
->withErrors($e->getErrors())
->with([
'Exception' => $e->getMessage(),
'arrayInputs' => $arrayInputs
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment