• 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

str_replace or preg_replace random number from string

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

Change the alert text on add to cart action without selected variation in Woocommerce

Combine array with same value and add other [duplicate]

How to insert data from multiple select dropdown values into database?

Get all WooCommerce products within own plugin

Convert every two values of an associative array into key-value pairs

I want to use codeigniter foreign character library in my custom PHP project how i can use it?

Prestashop webservice API creating cart rules

What will the best solution for this multiple optional filter?

Laravel php artisan serve to mimic HTTPS

SMTP ERROR: MAIL FROM command failed: 530 5.7.0 Must issue a STARTTLS command first when using PHPMailer

how to search for a file with php

php echo xml documents with header

Create tags in laravel post publishing

About Contact Privacy policy Terms and conditions