• 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

Malformed MIME header error in Symfony 5.3

WooCommerce Subscriptions: Remove role on cancelled subscription

Converting IPv6 to IPv4 address in PHP

Make survey at laravel 5.4 and MySQL

How can I make Laravel return a custom error for a JSON REST API

Can I write PHP code across multiple lines per statement?

str_word_count() function doesn't display Arabic language properly

PHP Startup: Unable to load dynamic library 'openssl' in Ubuntu

How to show selected value using javascript in laravel

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

How can I get user id from session in javascript?

How can I format this number correctly using PHP?

unable to load your default controller on Codeigniter

how to youtube api data to print in toolset metabox using a button click before save-post

Symfony redirect if already loggedin from login page

About Contact Privacy policy Terms and conditions