• 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

find in set in laravel ? example

Doctrine ORM: Excluding Records Based on Values of Nested Relationships

PHPExcel How to set conditional formatting to change cell background color based on cells values

How to loop sql table data inside a html table

Update Total in checkout of Woocommerce with Ajax Request

httpd.conf on Windows: can't locate API model structure `php8_module`

Encrypt in php and decrypt in Dart(flutter)

Laravel relationship belongsToMany with composite primary keys

how to redirect the user back to desired URL after login page in PHP?

Attempted to call an undefined method named "get" of class "MailController"

PHPExcel_IOFactory::createWriter causes wrong behaviour

correct PHP headers for pdf file download

How to submit the custom form data in database in WordPress without plugin using ajax?

browsersync doesn't work with XAMPP

curl returning 301 error after migrating to https

About Contact Privacy policy Terms and conditions