• 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 to Display Data in Yajra Datatables Laravel 7?

Yii2 select2 database exception number of bound variables does not match number of tokens

How to implement placeholder in a php file for moodle plugin?

Encrypt in php and decrypt in Dart(flutter)

How to load Codeigniter 4 lang file into an array variable

How to install ZeroMQ for PHP on an Alpine Linux container?

How to upload mpdf file after generating to s3 bucket in php

Python - Include another Python script

How to validate tin and cst using PHP?

XSS attack still works despite htmlspecialchars() doing its work

How to set a domain name with php artisan serve

How do I truncate a decimal in PHP?

Laravel after login Two factor not working

Performance of foreach, array_map with lambda and array_map with static function

How to change HTML structure inside WP <head>

About Contact Privacy policy Terms and conditions