• 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 install php yaml on CentOs?

How to fix bootstrap multiselect search data using ajax

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

How to add a heading in between checkout fields of WooCommerce

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

Can I write PHP code across multiple lines per statement?

How do I loop through an MS SQL database with VB.NET?

Access relation of pivot table in Laravel

Jquery DataTables: Data not displaying in table via Ajax

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

how to loop through json response data using ajax jquery?

How to get Laravel's CSRF Token from Another Website?

possible options to create pdf file using html elements to generate invoice in php and codeigniter

Get latest Tweets - What API

If action is on a different page do I use fwrite function

About Contact Privacy policy Terms and conditions