• 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

PHP header location absolute URL

Put content of wordpress page inside div

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

Custom API and cunsuming in php?

Symfony process run throws exception - executing on command line works

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

Laravel PackageManifest.php: Undefined index: name

getting error while enter Command => php artisan route:list

Open a popup box after receiving result from ajax

Autoloading classes in PHPUnit using Composer and autoload.php

how to youtube api data to print in toolset metabox using a button click before save-post

JSON Render Issue in Date Object Laravel and PHP 7.4

PHP SoapClient: set a namespace without prefix

How to get quarter for future date using Carbon?

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

About Contact Privacy policy Terms and conditions