• 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

Connecting an HTML webpage to a SQL Server

php curl requesting twice

How to skip cart page on woocomerce for certain products only?

How to insert Google Adsense Code in PHP script?

CSV to PHP class properties

image source not readable

Combining a describing and one array with data

IlluminateDatabaseQueryException: SQLSTATE[HY000]: General error: 1 no such table - In clone project

What is the difference between client-side and server-side programming?

Add Class in html Dynamically in PHP

Custom API and cunsuming in php?

Refresh specific HTML content that retrieves data from MySQL

Laravel Schedule not sending email

Laravel no logout option from menu after successfull login

Issue with laravel eloquent model property

About Contact Privacy policy Terms and conditions