• 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

Uploading video to Youtube using Youtube Data API V3 and Google API Client PHP -- getting 401 (unauthorized) message

Yii2 redirecting to previous page after login

Display the default discounted price and percentage on Woocommerce products

Detect a fetch request in PHP

Explain how this array transposing and flattening function works

How to get AJAX to post on second page?

How to delete old images from public folder on update using Laravel

PHP sort array of objects by two properties

PHP how to detect if running on arm64 cpu?

How to separate letters and digits from a string in php

How to create a cookie to store the timestamp of when a page is first loaded with php

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

Distribute array row data to make multiple new rows

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

Getting public posts of a random user from Facebook API

About Contact Privacy policy Terms and conditions