• 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

Populate Dynamic Dropdowns List in Codeigniter

How to submit the custom form data in database in WordPress without plugin using ajax?

Filter WooCommerce related products by Polylang language

Ajax GET request fails in laravel 8

how to redirect the user back to desired URL after login page in PHP?

PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown

how to get value from array in laravel

using random function but it's displaying duplicates

Custom Button next to “ADD TO CART” button of WooCommerce based on Product Type

How to Display Data in Yajra Datatables Laravel 7?

Laravel lang slug in url

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

Woocommerce redirect after add-to-cart error

Error Class "LaravelFortifyFeatures" not found

Assign output of PHP function to a variable

About Contact Privacy policy Terms and conditions