• 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

Symfony Mercure "Failed to send an update"

Target Individual Form Instance/Counter Inside A PHP While Loop

how to redirect the user back to desired URL after login page in PHP?

Transfer data between JavaScript and PHP through JSON

How to loop sql table data inside a html table

onKeyUp event calculation not working on the following rows from php generated forms except the first one

PHPUnit (Phar) Fatal Error Only When Test Fails

How Can I Do LIMIT 1, 2 In WP_Query

Fetch files from next cloud storage and display in Laravel website

How to set dynamic `home` and `siteurl` in WordPress?

Google Gmail API - How to login programatically?

Woocommerce product attributes with hierarchy like categories

WooCommerce: Add/display Product or Variation custom field everywhere

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

Put content of wordpress page inside div

About Contact Privacy policy Terms and conditions