• 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

Execute only one time and then wait set period of time before executing again

Check for PDO Results, If None Display Message, If Yes then Loop Through

Passing a boolean value from checkbox in Laravel form

wordpress : How to specify the cause "This site can’t be reached"

Laravel Passport - Not able to get token string in response?

How to show a popup modal in codeIgniter?

Can I use a WooCommerce function without any WooCommerce page?

Unable to Edit config.inc.php

How to change the app environment at run time?

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

how to see if database exists with PDO [duplicate]

how to get value from array in laravel

How to show selected value using javascript in laravel

How to separate letters and digits from a string in php

Get WooCommerce products from specific category

About Contact Privacy policy Terms and conditions