• 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

how to see if database exists with PDO [duplicate]

How to change product Image when variables are selected in Shop and Archive Pages?

Laravel SQL query midnight time not showing

TesseractOCR not working for Laravel

Modify microseconds of a PHP DateTime object

Comma separated list from array with "and" before last element

Get data from accuweather api url

Querying only one row from a one to many relationship laravel

Unable to uninstall brew php from homebrew

VB.NET WebRequest with PHP POST

How can I pass the list to the component variable in Laravel?

How to remove Deprecated SymfonyComponentDebugDebugClassLoader?

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

How to redirect to another page and call a Function there on Angular ng-click

Get latest Tweets - What API

About Contact Privacy policy Terms and conditions