• 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

phpunit - testing is painfully slow

Search for array row with specific column value and return another value from qualifying row

How do I call Validator from a namespace with an already existing Validator class

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

Insert a DIV after the 6th product only once in WooCommerce category archives

Parameter is not sent to Laravel route in Ajax

PHP error: "The zip extension and unzip command are both missing, skipping."

Convert regular text to array using notepad++

How to change HTML structure inside WP <head>

add " ? " in url via htaccess RewriteRule

Insert database rows from columns of data from associative array of indexed arrays

How to remove from a multidimensional array all duplicate elements including the original?

HTTP Range requests with php for Video Embedding for solving going to specific time in video (seek bar not work)

How to add a custom field to all Woocommerce attribute terms using add_action

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

About Contact Privacy policy Terms and conditions