• 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

Laravel PHP: multiple project run at the same time [closed]

add " ? " in url via htaccess RewriteRule

XSS attack still works despite htmlspecialchars() doing its work

Attempt to read property "view" on null when sending password reset email

Handle error for duplicate entries - PHP/MySQL

Group rows by column and sum another column within groups [duplicate]

Implode array with array of glue strings

Laravel whole batch is cancelled if one Job fails

Destroy session upon refresh

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

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

Facebook SDK error: Cross-site request forgery validation failed. Required param "state" missing from persistent data

How to map the two arrays with a duplicate value?

Prestashop webservice API creating cart rules

PHPExcel file download using AJAX call

About Contact Privacy policy Terms and conditions