• 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

php: command not found Command PhaseScriptExecution failed with a nonzero exit code

How do I set the maximum php memory limit

Coinpayments create_transaction "ERROR: Invalid command!"

Yii2: How to download backup files using spanjeta/yii2-backup?

PHP drop down list using array's and foreach (else and for) code

merge all files in directory to one text file

How can I make a full text index of the column?

Symfony process run throws exception - executing on command line works

How can I easily switch between PHP versions on Mac OSX?

Call to undefined function openssl_decrypt

html-php form submission after validation through JavaScript [closed]

Mysqli Output to a table

MySQL upgrade causing unexpected results on simple WHERE clauses

how to identify the web server name of remote host

How can I make Laravel return a custom error for a JSON REST API

About Contact Privacy policy Terms and conditions