• 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 get page number on dompdf PDF when using "view"

How to give apache permission to write to home directory?

Destroy session upon refresh

Unable to get password for the instance created from AMI

Toggle between a textbox and a select using PHP

PHP SoapClient: set a namespace without prefix

Get sum of arrays inside array

Laravel whole batch is cancelled if one Job fails

Jquery DataTables: Data not displaying in table via Ajax

Additional price based on cart item count in WooCommerce

How do I set the maximum php memory limit

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource [duplicate]

selected value from the listbox in php

Select option menu read from database and use it's values

How can I access an array/object?

About Contact Privacy policy Terms and conditions