• 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

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

Confirm Leave on External Links in Wordpress

ldap is missing from system when installing adldap2 in laravel

str_word_count() function doesn't display Arabic language properly

Generate random username based on full name php

I need to link Google Sheet with my Laravel

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

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

php curl_exec() Connection refused when retrieving a remote image

Artisan, creating tables in database

Reorder attribute dropdown terms in Woocommerce single variable products

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttpPsr7Request

php curl requesting twice

Alert message after submitting form in PHP

About Contact Privacy policy Terms and conditions