• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Laravel 4 Redirect::back() not going to previous page (refreshing current page)

phpredirectlaravel-4


PHP Snippet 1:

Route::get('/customer', array('as' => 'customer', 'uses' => 'MyController@showCustomer'));

PHP Snippet 2:

function saveCustomer($id) {

    ...

    Redirect::route('customer');
}

PHP Snippet 3:

if(isset($_SERVER['HTTP_REFERER']))
    return Redirect::back();

return Redirect::to('/');

Related Snippets

Passing a boolean value from checkbox in Laravel form

500 Internal Server Error on Ajax request. Not sure the origin of the problem

Merge key and value of array index [duplicate]

calling server using nusoap with complextype

Edit XML in HTML form and submit to self

How to install PHP composer inside a docker container

Composer fails with kylekatarnls/update-helper on new homestead

Target Individual Form Instance/Counter Inside A PHP While Loop

how to youtube api data to print in toolset metabox using a button click before save-post

PHP function Not Working As Expected From functions.php Include File

Batch request Google Calendar php API

Get keys from associative array [duplicate]

Laravel Displaying image from database

oauth-private.key does not exist or is not readable

mysql_result is defined but mysql_free_result warns it expected a resource

About Contact Privacy policy Terms and conditions