• 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

Statement that checks whether a URL contains a particular path?

OAuth2 Token PHP

Implode columnar values between two arrays into a flat array of concatenated strings

Creating command to backup MySql database in Laravel

Converting IPv6 to IPv4 address in PHP

Return new collection without modifying original collection

GuzzleHttp Hangs When Using Localhost

Call to a member function givePermissionTo() on null

How do I refresh a DIV content?

ORA-12546: TNS:permission denied error connection to remote oracle server

Log file is not being written in Laravel 5.5

Exact alternate to mcrypt_encrypt in PHP 7.2

"Unable to load dynamic library 'pdo_sqlsrv.so' "Cenos7 PHP7.2.10

Custom post type single page not working

How to add a heading in between checkout fields of WooCommerce

About Contact Privacy policy Terms and conditions