• 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

Navigation idle on content download

PHP if in_array() how to get the key as well?

How can I get user id from session in javascript?

Form Validation and Submission to database

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

Use Python plotly chart in PHP

Laravel: Why is my variable not being set while it's in the construct function of the controller?

Detect if PHP session exists

Check if my GET request has Header: Token

Target Laravelista is not instantiable

PHP and WebView - Cookie doesn't are the same

laravel controller function parameters

VB.NET WebRequest with PHP POST

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

How can I get a div content in php

About Contact Privacy policy Terms and conditions