• 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

How to break out of a foreach once a condition is met?

Additional price based on cart item count in WooCommerce

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

using random function but it's displaying duplicates

Add rows to Single product Additional information table in WooCommerce 3.6

Xdebug in Laravel is not working with VSCode

Store / Website Column in Magento 2 Admin Grid - Custom Module

How to fix bootstrap multiselect search data using ajax

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

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

Getting output of MS stored procedure on php call

Alert message after submitting form in PHP

how to get the header value, if we don't know the value because the value is random from the server

Star rating with half star support

loop through an anchor id

About Contact Privacy policy Terms and conditions