• 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

Yii Ajax Submit button

Laravel PHP: multiple project run at the same time [closed]

How to get AJAX to post on second page?

Group data in a multidimensional array based on two columns

Stop caching for PHP 5.5.3 in MAMP

PHP password_verify

how to insert data into select2 search input after scan using qrcode

How to redirect to another page after n seconds in wordpress without using javascript?

insert multiple rows in a saveall in cakephp

How to debug in WooCommerce 3+

How to convert a carbon into string, to take the date only?

How to create a scheduler application in php

laravel sanctum Route [login] not defined

How to map the two arrays with a duplicate value?

How to MODIFY a Google Docs document via API using search-and-replace?

About Contact Privacy policy Terms and conditions