• 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

Display a success custom notice after Placing an Order in WooCommerce

Get WooCommerce products from specific category

Do I need to install `fxp/composer-asset-plugin` if I'm not doing front-end development

GuzzleHttp Hangs When Using Localhost

How to get page number on dompdf PDF when using "view"

Xdebug in Laravel is not working with VSCode

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

Why is this PHP array not the same?

How to redirect to another page after n seconds in wordpress without using javascript?

How to get total pages of PDF with FPDF?

PHP Find Array Index value in multi-line array

Yii2: How to download backup files using spanjeta/yii2-backup?

Make Calculator - When Button clicked the No shows in Textbox.

Laravel php artisan serve to mimic HTTPS

JQuery content editable div and text box on submit not sending POST

About Contact Privacy policy Terms and conditions