• 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

How do I remove this delivery notification from here?

How to insert data from multiple select dropdown values into database?

xdebug 3 not working in ubuntu 20.04 with docker

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

PHP - Store information with NO database

WordPress Security Standards want me to escape my html, but how to do it correctly?

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

HTTP Range requests with php for Video Embedding for solving going to specific time in video (seek bar not work)

MySQL - Connection failed: No route to host

get data-value with variable value

PHP function Not Working As Expected From functions.php Include File

Only on Firefox "Loading failed for the <script> with source"

Update Total in checkout of Woocommerce with Ajax Request

Getting public posts of a random user from Facebook API

How do I enable error reporting in Laravel?

About Contact Privacy policy Terms and conditions