• 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

PHP file_get_contents function

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

Inserting data into SQL Server Db An Invalid direction was specified

laravel controller function parameters

carbon generated datetime not stored correctly into the database

Destroy session upon refresh

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

CSS file not imported in laravel blade view

retrieve data from database using session

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

Last order would be re-order in wooCommerce. How is it possible?

dockerizing Laravel + vue

Creating Combinations of Elements

Split a string array into pieces

About Contact Privacy policy Terms and conditions