title: Laravel 4 Redirect::back() not going to previous page (refreshing current page)
body: <p>I have a simple Lavel 4 project and I am trying to do a simple redirect to the previous page after the information has been submitted. However, when inserting <code>Redirect::back()</code> it's only refreshing the current page. How can I get it to redirect properly to the previous page it was on?</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>    public function saveCustomer($id) { 
  
      $zip_code = DB::table('zip_codes')
                      -&gt;where('zip_code', Input::get('user_zip_code'))
                      -&gt;first();  
  
      if (!empty(Input::get('user_id'))) {
          $user_id = Input::get('user_id');
  
          $user = User::find($user_id);
  
          $user-&gt;user_zip_code = $zip_code-&gt;zip_code;
  
          $user-&gt;office = $zip_code-&gt;office;
  
          $user-&gt;save();
  
      } else {
          $user_id = NULL;
      }       
  
      $userdata = [
                  'user_id' =&gt; $user_id,
                  'first_name' =&gt; Input::get('first_name'),
                  'last_name' =&gt; Input::get('last_name'),
                  'street_1' =&gt; Input::get('street_1'),  
                  'street_2' =&gt; Input::get('street_2'),  
                  'apartment' =&gt; Input::get('apartment'),
                  'phone_1' =&gt; Input::get('phone_1'),  
                  'phone_2' =&gt; Input::get('phone_2'),
                  'state' =&gt; 'Alabama',
                'user_zip_code' =&gt; Input::get('user_zip_code'),
                'city' =&gt; $zip_code-&gt;city
              ];                
              $rules = array(
                  'first_name' =&gt; 'required',
                  'last_name' =&gt; 'required',
                  'street_1' =&gt; 'required',
                  'phone_1' =&gt; 'required'
              );
  
              $validation = Validator::make($userdata, $rules);
  
              if($validation-&gt;fails()){
                  return Redirect::to("customer/edit/$id")-&gt;withErrors($validation)-&gt;withInput();
              } 
  
              UsersInformation::find($id)-&gt;update($userdata);
  
              return Redirect::back();
  </code></pre>
  
  <p><strong>Blade template</strong></p>
  
  <pre><code>    {{ Form::open(array('name' =&gt; 'edit customer', 'action' =&gt; array('CustomerController@saveCustomer', $customer-&gt;id)))}}
         @foreach($errors-&gt;all() as $error)
                  &lt;p class="albox errorbox"&gt;{{$error}}&lt;/p&gt;
              @endforeach
              &lt;div class="four columns"&gt;      
          @if (isset($customer-&gt;first_name))
              {{ Form::hidden('user_id', '' . $customer-&gt;user_id . '')}}
          @endif                  
          &lt;label class="form"&gt;First Name:&lt;/label&gt; &lt;span class="required"&gt; (required)&lt;/span&gt;&lt;br /&gt;
          @if (isset($customer-&gt;first_name))
              {{ Form::text('first_name', '' . $customer-&gt;first_name . '')}}&lt;br /&gt;
          @else
              {{ Form::text('first_name')}}&lt;br /&gt;
          @endif
  
          &lt;label class="form"&gt;Last Name:&lt;/label&gt; &lt;span class="required"&gt; (required)&lt;/span&gt;&lt;br /&gt;
          @if (isset($customer-&gt;last_name))
              {{ Form::text('last_name', '' . $customer-&gt;last_name . '')}}&lt;br /&gt;
          @else
              {{ Form::text('last_name')}}&lt;br /&gt;
          @endif
  
          &lt;label class="form"&gt;Primary Street:&lt;/label&gt; &lt;br /&gt;
          @if (isset($customer-&gt;street_1))
              {{ Form::text('street_1', '' . $customer-&gt;street_1 . '')}}&lt;br /&gt;
          @else
              {{ Form::text('street_1')}}&lt;br /&gt;
          @endif  
  
          &lt;label class="form"&gt;Secondary Street:&lt;/label&gt; &lt;br /&gt;
          @if (isset($customer-&gt;street_2))
              {{ Form::text('street_2', '' . $customer-&gt;street_2 . '')}}&lt;br /&gt;
          @else
              {{ Form::text('street_2')}}&lt;br /&gt;
          @endif              
  
          &lt;label class="form"&gt; Primary Phone Number:&lt;/label&gt; &lt;br /&gt;
          @if (isset($customer-&gt;phone_1))
              {{ Form::text('phone_1', '' . $customer-&gt;phone_1 . '')}}&lt;br /&gt;
          @else
              {{ Form::text('phone_1')}}&lt;br /&gt;
          @endif
  
          &lt;label class="form"&gt;Secondary Phone Number:&lt;/label&gt; &lt;br /&gt;
          @if (isset($customer-&gt;phone_2))
              {{ Form::text('phone_2', '' . $customer-&gt;phone_2 . '')}}&lt;br /&gt;
          @else
              {{ Form::text('phone_2')}}&lt;br /&gt;
          @endif          
  
          &lt;label class="form"&gt;Apartment:&lt;/label&gt;&lt;br /&gt;
          @if (isset($customer-&gt;apartment))
              {{ Form::text('apartment', '' . $customer-&gt;apartment . '')}}&lt;br /&gt;
          @else
              {{ Form::text('apartment')}}&lt;br /&gt;
          @endif
  &lt;label class="form"&gt;City/Zip Code:&lt;/label&gt; &lt;span class="required"&gt; (required)&lt;/span&gt;&lt;br /&gt;      
          &lt;select name="user_zip_code"&gt; 
              &lt;option value='{{{ $customer-&gt;user_zip_code }}}'&gt;{{{ $customer-&gt;city  }}} - {{{ $customer-&gt;user_zip_code }}}&lt;/option&gt;
               @foreach ($zip_code as $zip_codes)
                  &lt;option value='{{ $zip_codes-&gt;zip_code  }}'&gt;{{ $zip_codes-&gt;city  }} - {{ $zip_codes-&gt;zip_code  }}&lt;/option&gt;
               @endforeach
          &lt;/select&gt;&lt;br /&gt;         
  
  &lt;button type="submit" class="button is-success"&gt;Save&lt;/button&gt;&lt;br /&gt;&lt;br /&gt;
              &lt;/div&gt;
  {{ Form::close() }}
  </code></pre>
  
  <p><strong>Not sure if needed but here is also my route.php page</strong></p>
  
  <pre><code>Route::get('customer/edit/{id}', 'CustomerController@editCustomer');
  </code></pre>