• 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 csrf token mismatch for ajax POST Request

How to test laravel controller method?

if statement inside concatenation

HTML and PHP in one file

JSON Render Issue in Date Object Laravel and PHP 7.4

Populate Dynamic Dropdowns List in Codeigniter

Laravel multi auth - Authentication user provider [] is not defined

Laravel dosen't connect with Oracle

PHP random string generator

Merge key and value of array index [duplicate]

How can I resolve "Your requirements could not be resolved to an installable set of packages" error?

Reducing authentication calls on external API (Laravel 5.6)

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

Creating live search with AJAX and CodeIgniter

Attempted to call an undefined method named "get" of class "MailController"

About Contact Privacy policy Terms and conditions