• 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

SQLSTATE[HY000]: General error: 1 table posts has no column named *

How to test laravel controller method?

How to implement placeholder in a php file for moodle plugin?

php file upload scanning using clamav, permissions on /tmp/

Why does using salted hash on python and php give me different results?

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

In PHP, which is faster: preg_split or explode?

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

How to pass security cloudflare server with php curl

Spam Filter in Contact Form

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

Statement that checks whether a URL contains a particular path?

how to see if database exists with PDO [duplicate]

Must be of the type array, null given,

how to retrieve the first and last instance of a row in pdo dataset

About Contact Privacy policy Terms and conditions