• 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

Laravel database insert with combining array and string

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

How to get page number on dompdf PDF when using "view"

Could not decode a text frame as UTF-8.

Why rand() every time I refresh the page?

Adding reCAPTCHA v2 into my PHP file

How to display MySQL table using php and edit it in a web browser

How to insert Google Adsense Code in PHP script?

How to pass security cloudflare server with php curl

HTML and PHP in one file

How to set time with DateTime modify?

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

Laravel relationship belongsToMany with composite primary keys

How do I enable error reporting in Laravel?

WooCommerce Additional Information - if empty, hide

About Contact Privacy policy Terms and conditions