• 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

java URL working on browser but not in client program

Merge column values from two arrays to form an indexed array of associative arrays

Results page in other window

protect images from being copied

Show date difference as "20" instead of "20 years ago"

Laravel dosen't connect with Oracle

Where do I need to place a hook for phpunit?

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

How to pass data to all views in Laravel 5?

Dynamic dropdown Ajax PHP request

Unable to Edit config.inc.php

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

Laravel after login Two factor not working

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

PHP and WebView - Cookie doesn't are the same

About Contact Privacy policy Terms and conditions