• 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

Xdebug 3 not showing in phpinfo on m1 Monterey

merging two arrays with specified index

MySQL default time format UTC or GMT?

Add Metadata, headers (Expires, CacheControl) to a file uploaded to Amazon S3 using the Laravel 5.0 Storage facade

How to validate Envato Purchase Code in PHP

Why is this PHP array not the same?

Custom API and cunsuming in php?

Pages are working fine on localhost but not running on the hosting server

Printing more than one array using print_r or any other function in php

Combining a describing and one array with data

How can I get new CSRF token in LARAVEL by using ajax

PHP/HTML: Creating A SubMenu

Cache clear probem in Larave

Add customer email and phone in "Order" column to admin orders list on Woocommerce

Laravel lang slug in url

About Contact Privacy policy Terms and conditions