• 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

Hi, I am making a contact form thingy, and my php isn't working any reason why?

How can I remove the "Advanced" panel of all blocks in WordPress block editor?

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

Telegram bot doesn't answer

Project structure for PHP

How to debug in WooCommerce 3+

Search for array row with specific column value and return another value from qualifying row

Why getting "Build step 'Execute shell' marked build as failure" error while creating a backup tar for files

oauth-private.key does not exist or is not readable

How do I pass the dynamic output of a php variable or php function to a CSS variable?

Symfony/Form add attribute based on the data

MySQL default time format UTC or GMT?

Symfony redirect if already loggedin from login page

How to get transaction details in notify_url page in paypal

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

About Contact Privacy policy Terms and conditions