• 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 insert Google Adsense Code in PHP script?

Doctrine 2 mapping referencing unique key

Need to display only array value in JSON output

GuzzleHttp Hangs When Using Localhost

CodeIgniter force_download is not working

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

cakephp save drag and drop list order to database

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null

Laravel - How to properly generate unique slugs from article titles?

Wordpress wpdb->delete issue

Creating a config file in PHP

Laravel 5.2: Unable to locate factory with name [default]

Laravel Factory not calling callback 'afterCreating'

How to get company posts from LinkedIn via API?

PHP and WebView - Cookie doesn't are the same

About Contact Privacy policy Terms and conditions