• 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

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

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

Laravel Mix Uncaught ReferenceError: $ is not defined

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

Boolean assignment operators in PHP

Limit login attempts in Laravel 5.7

Get latest Tweets - What API

Unable to uninstall brew php from homebrew

Laravel multi auth - Authentication user provider [] is not defined

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

woocommerce change position of price

How to loop a tree array with unknown depth and get array blocks?

Minimum order amount except for specific shipping method in WooCommerce

Laravel Nova, route not found

About Contact Privacy policy Terms and conditions