• 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

Change the alert text on add to cart action without selected variation in Woocommerce

Check if my GET request has Header: Token

How to install php yaml on CentOs?

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

How can I get a div content in php

How to MODIFY a Google Docs document via API using search-and-replace?

Store multiple fields in JSON column (Nova CMS)

PhP how to calculate moments with variables rows

How to add class name to an existing tag in php

insert multiple rows in a saveall in cakephp

PHP my timezone is no setting up in PHP.ini File in xampp

how to fix Service provider class not found when using repository?

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

onKeyUp event calculation not working on the following rows from php generated forms except the first one

how to check version of codeigniter framework?

About Contact Privacy policy Terms and conditions