• 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

Converting IPv6 to IPv4 address in PHP

Yii2: How do I debug console commands?

Debugging Stripe Webhook Event

echo language construct is discouraged. (PHP)

Composer Warning: openssl extension is missing. How to enable in WAMP

How to add a custom field to all Woocommerce attribute terms using add_action

Filter WooCommerce products with post__in and additional meta queries

laravel controller function parameters

How to retrieve Active Directory group policy maximum password age using LDAP

Redirect to previous page with php

How to auto populate preferredCountries from intl-tel-input with db output

Need to display only array value in JSON output

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

How to loop sql table data inside a html table

how to use extended ASCII instead of unicode in PHP

About Contact Privacy policy Terms and conditions