• 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

Trying to iterate over a mongodb cursor twice - failing

PHP: PDO + CSV export not downloading (headers issue?)

Manage independently the decimal number of the price of each product [duplicate]

Display a product custom field only in WooCommerce Admin single orders

GuzzleHttp Hangs When Using Localhost

"properties should not be accessed directly" issue during WooCommerce 3.0 checkout

PHPUnit (Phar) Fatal Error Only When Test Fails

Can't exclude directories from .htaccess mobile redirect?

Object of class stdClass could not be converted to string error

Laravel Factory not calling callback 'afterCreating'

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

How can I get a div content in php

php script to delete files older than 24 hrs, deletes all files

phpunit - mockbuilder - set mock object internal property

possible options to create pdf file using html elements to generate invoice in php and codeigniter

About Contact Privacy policy Terms and conditions