• 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

Change the alert text on add to cart action without selected variation in Woocommerce

PHP Imap , php 7.4.3 on mac osx catalina

PHPExcel export HTML table to xlsx

Laravel Jetsream Profile page not loading on fresh install

PHP SoapClient: set a namespace without prefix

Transfer data between JavaScript and PHP through JSON

PHP sort array of objects by two properties

PHP cURL (SSL certificate problem: self signed certificate in certificate chain)

GuzzleHttp Hangs When Using Localhost

Adding Multiple Custom Post Types in Wordpress

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

How to get multiple values with same key from an array PHP

How to unlink image from folder?

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

Create a zip file and download it

About Contact Privacy policy Terms and conditions