• 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

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

What is PHP's equivalent of JavaScript's "array.every()"?

Laravel Route issues with Route order in web.php

I want to display default profile image if user do not have profile image

PHP usort() order in case of equality

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

shell errors running php exec

Valet, Xdebug after reboot Big Sur not working

OctoberCMS / Anonymous Global Scope

Call to undefined function openssl_decrypt

PHP Include for HTML?

array_key_exists(): The first argument should be either a string or an integer

How to access a var with "-" in PHP [duplicate]

hidden INPUT value not available in $_POST

Symfony run hint kernel.secret parameter not found

About Contact Privacy policy Terms and conditions