• 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

Jquery DataTables: Data not displaying in table via Ajax

How to make Canonicals with PHP

PHP's array_map including keys

Laravel Nova, route not found

Can I write PHP code across multiple lines per statement?

add_action() function in wordpress not working [duplicate]

CONCAT columns with Laravel 5 eloquent

wp_remote_get() not passing authentication

Transfer data between JavaScript and PHP through JSON

Why does array_map() with null as callback create an "array of arrays"?

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

sort() not affecting original array while inside foreach loop

advanced custom fields wordpress custom class

Fatal error: [] operator not supported for strings

Substitute integers and dots with regex [duplicate]

About Contact Privacy policy Terms and conditions