Laravel4 redirect withInput() fails to populate fields

When I redirect to the page it fails to populate the input fields.

if ($validator->fails()){
            return Redirect::to('books/create')->with('message_warning','<strong>Warning!</strong> some input is not valid.')->withErrors($validator)->withInput();

        }else{
            $book->save();
            return Redirect::action('BooksController@index')->with('message_success','<strong>Awesome!</strong>Your book has been successfully added.');
        }

Input::old() works on redirection.

Form Excerpt

{{  Form::open(array('action' => 'BooksController@store', 'method' => 'post', 'role'=> 'form')) }}

    <div class="form-group">
    <label for="title">Title</label>
    <input type="text" name="title" class="form-control" id="title" placeholder="Name of awesome book?">
  </div>

Answers


You have to specify the value using the old input.

<input type="text" name="title" value="{{ Input::old('title') }}">

Need Your Help

Trouble passing a string from an array to a variable within a for loop

twig

Im setting a "category" and passing it to a template that I'm including:

Perl: HTML Scraping from an Authenticated website

screen-scraping

While HTML Scraping is pretty well-documented from what I can see, and I understand the concept and implementation of it, what is the best method for scraping from content that is tucked away behind