• 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 properly set "0000-00-00 00:00:00" as a DateTime in PHP

PHP: Convert any string to UTF-8 without knowing the original character set, or at least try

PHPSpreadsheet - How Do I Use Auto Migration Tool

Can I use a WooCommerce function without any WooCommerce page?

Form Validation and Submission to database

How to install PHP composer inside a docker container

PHP: remove filename from path

How to show selected value using javascript in laravel

Display specific shipping method if woocommerce product has specific acf field value

image source not readable

Laravel 5 issue with wherePivot

Add a custom text for a particular product on specific email notification in Woocommerce

RuntimeException: Unable to create the cache directory (/var/www/sonata/app/cache/dev)

How to make a array inside array?

Display a product custom field only in WooCommerce Admin single orders

About Contact Privacy policy Terms and conditions