Skip to content

Commit a0f9364

Browse files
committed
Old Input Sent Back To Views On Errors
Signed-off-by: David Thorpe <[email protected]>
1 parent 7fc09f0 commit a0f9364

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/controllers/ObjectBaseController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function postNew()
154154
$valid = $this->validateWithInput === true ? $record->isValid( Input::all() ) : $record->isValid();
155155

156156
if( !$valid )
157-
return Redirect::to( $this->new_url )->with( 'errors' , $record->getErrors() );
157+
return Redirect::to( $this->new_url )->with( 'errors' , $record->getErrors() )->withInput();
158158

159159
// Run the hydration method that populates anything else that is required / runs any other
160160
// model interactions and save it.
@@ -177,7 +177,7 @@ public function postEdit( $id )
177177
$valid = $this->validateWithInput === true ? $record->isValid( Input::all() ) : $record->isValid();
178178

179179
if( !$valid )
180-
return Redirect::to( $this->edit_url.$id )->with( 'errors' , $record->getErrors() );
180+
return Redirect::to( $this->edit_url.$id )->with( 'errors' , $record->getErrors() )->withInput();
181181

182182
// Run the hydration method that populates anything else that is required / runs any other
183183
// model interactions and save it.

0 commit comments

Comments
 (0)