• 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

Symfony redirect if already loggedin from login page

how can I set a session variable in Drupal 8 and get it in a php script?

Symfony Make:Migration : The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

How to unlink image from folder?

Laravel 5.1 Unknown database type enum requested

Laravel Pagination links() not working

How to extract price from given url using Xpath?

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

Remove country code from phone number?

How to add a sidebar to Woocommerce Shop Page?

How to reset Laravel AuthManager/guards in between API calls in tests?

how to create html table in php

Access denied for user 'homestead'@'localhost' (using password: YES)

find in set in laravel ? example

Remove categories with all childs derived from parent category

About Contact Privacy policy Terms and conditions