• 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

Why i get wrong output for html markdown?

ConstraintViolationListInterface to Exception in Symfony

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

Symfony - "framework.test" config is not set to true

PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

PHP contact form configuration [duplicate]

How to delete old images from public folder on update using Laravel

Fatal error: [] operator not supported for strings

Laravel-fopen: failed to open stream: Permission denied

Reading input in php from terminal

browsersync doesn't work with XAMPP

No result using makeStyles Material UI in react 18

Pages are working fine on localhost but not running on the hosting server

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

how to pass row id in href of a tag in codeigniter controller?

About Contact Privacy policy Terms and conditions