• 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

Symfony Mercure "Failed to send an update"

Explain how this array transposing and flattening function works

Redis Command To Sort Keys

Add Metadata, headers (Expires, CacheControl) to a file uploaded to Amazon S3 using the Laravel 5.0 Storage facade

CSV to PHP class properties

backup files to google drive using PHP

How to execute sql code based on fetch array

Creating live search with AJAX and CodeIgniter

Do I need to install `fxp/composer-asset-plugin` if I'm not doing front-end development

Losing session data after POST from third party website

How to Make Laravel Eloquent "IN" Query?

How to show selected value using javascript in laravel

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

PHP 8 - libxml_disable_entity_loader() has been deprecated. How do I replace the functionality it provides?

PHP password_verify

About Contact Privacy policy Terms and conditions