• 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

Inserting data into SQL Server Db An Invalid direction was specified

unable to load your default controller on Codeigniter

Woocommerce Checkout - Add conditional field required if one field is filled

Timber: Single post pagination does not work (wp_link_pages)

Performance of foreach, array_map with lambda and array_map with static function

How to increase the PHP upload limits [duplicate]

Limit WooCommerce products in cart only from one custom taxonomy

How to display table header in every page using FPDF library?

Render the content of default_filter.php in Joomla front-end

Reload parent page after submit in iframe

How to use React Router with Laravel?

MySQL default time format UTC or GMT?

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

Custom add to cart button URL for specific product in WooCommerce?

How to get unique slug to same post-title for other time too?

About Contact Privacy policy Terms and conditions