• 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

Laravel Route issues with Route order in web.php

Make survey at laravel 5.4 and MySQL

How do I Post to .txt document before form submits

Component install error: JInstaller: :Install: File does not exist

Reorder attribute dropdown terms in Woocommerce single variable products

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

Adding Multiple Custom Post Types in Wordpress

php: command not found Command PhaseScriptExecution failed with a nonzero exit code

XSS attack still works despite htmlspecialchars() doing its work

Woocommerce redirect after add-to-cart error

Laravel - Browser displays message again when I press back button

Symfony Error: "An exception has been thrown during the rendering of a template"

How to fix Call to undefined method AppModelsTableName::factory?

Telegram bot doesn't answer

PHP password_verify

About Contact Privacy policy Terms and conditions