• 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

Server-sent events in PHP (without echo or print)

Target Individual Form Instance/Counter Inside A PHP While Loop

Xdebug 3 not showing in phpinfo on m1 Monterey

CodeIgniter 4: Like and Dislike Functionality

add_action() function in wordpress not working [duplicate]

Creating Combinations of Elements

Spam Filter in Contact Form

PHP: Print caught exception like Xdebug

How can I format this number correctly using PHP?

Filter WooCommerce related products by Polylang language

How to insert Google Adsense Code in PHP script?

How to debug in WooCommerce 3+

Add Class in html Dynamically in PHP

PHP how to detect if running on arm64 cpu?

WooCommerce - unset "<product> removed notice…" on cart page

About Contact Privacy policy Terms and conditions