• 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

google content api for shopping

Popup Window and PHP form

How to to send mail using gmail in Laravel?

Laravel Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) on a sub query with "ROW_NUMBER() OVER PARTITION"

Issue with laravel eloquent model property

MySQL order by field in Eloquent

Transform array, set each array element with parent key php

Results page in other window

Applying programmatically a coupon to an Order in WooCommerce3

php - add comma thousands separator but remove trailing zeros

Laravel no logout option from menu after successfull login

how to remove white space in select 2

Return new collection without modifying original collection

laravel MVC execution flow

Parsing JSON File to array in PHP

About Contact Privacy policy Terms and conditions