• 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 set time with DateTime modify?

PDOException SQLSTATE[HY000] [2002] No such file or directory

GuzzleHttp Hangs When Using Localhost

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

In PHP, which is faster: preg_split or explode?

Detect if PHP session exists

Phalcon: setStatusCode returns empty response

Symfony run hint kernel.secret parameter not found

Last order would be re-order in wooCommerce. How is it possible?

Appending data to an anchor tag

Log file is not being written in Laravel 5.5

Webscraping Symfony/Panther: Can't get HTML

Laravel get user data with profile

PHP how to detect if running on arm64 cpu?

How to keep value of selected value after form submission?

About Contact Privacy policy Terms and conditions