• 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 database insert with combining array and string

How to auto populate preferredCountries from intl-tel-input with db output

How to convert time from one timezone to another in PHP

wp_remote_get() not passing authentication

PHP error: "The zip extension and unzip command are both missing, skipping."

Getting output of MS stored procedure on php call

How to set time with DateTime modify?

Results page in other window

How to install php_imagick on wamp64

Laravel Gates using model and returns "Using $this when not in object context" Line 28 of AzureUser model

onKeyUp event calculation not working on the following rows from php generated forms except the first one

Doctrine 2 mapping referencing unique key

how to search for a file with php

Array to string conversion

PHP Form Not Inserting

About Contact Privacy policy Terms and conditions