• 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

Wordpress add responsive srcset header image to theme

Match csv filenames to table names and import

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

CodeIgniter 4: Like and Dislike Functionality

Error converting docx to pdf using Unoconv

Laravel post contact form giving me error 419

PHP array stringify

Get all WooCommerce products within own plugin

Magento 2 - Controller returning blank page

Lexik JWT authentication problem "Invalid credentials"

How to MODIFY a Google Docs document via API using search-and-replace?

Fatal error: Array callback has to contain indices 0 and 1

How to downgrade or install a specific version of Composer?

Minimum order amount except for specific shipping method in WooCommerce

Error Class "LaravelFortifyFeatures" not found

About Contact Privacy policy Terms and conditions