• 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

Filter array by skipping every nth element from the end

Popup Window and PHP form

How to run or debug php on Visual Studio Code (VSCode)

Inserting Country Selection into MySQL PHP [duplicate]

What is my SQL missing?

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

Sagepay Error The Vendor failed to provide a RedirectionURL

Phpunit partial mock + proxy Entity

MongoDB Duplicate Documents even after adding unique key

Appending data to an anchor tag

How to keep value of selected value after form submission?

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

PHP date() with timezone?

Creating Combinations of Elements

Create a zip file and download it

About Contact Privacy policy Terms and conditions