• 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 get the total hour from starting time to end time in php

PHP7 CLI attempts to load xdebug twice - "Cannot load Xdebug - it was already loaded"

Laravel Gates using model and returns "Using $this when not in object context" Line 28 of AzureUser model

Prevent blank space in pdf pages (DomPdf)

Laravel You requested 1 items, but there are only 0 items available

Webscraping Symfony/Panther: Can't get HTML

Check if a string contain multiple specific words

echo language construct is discouraged. (PHP)

How do I upload a laravel project on cPanel shared hosting?

Woocommerce redirect after add-to-cart error

Display Brand Name Above Product Title in Woocommerce Cart, Checkout Page, Orders and Email Notification

how to sort by a custom appended relation to model

Check if string contains a value in array [duplicate]

Why "Class 'GuzzleHttpClient' not found" even after Installing it in Laravel?

PHP only Hit Counter?

About Contact Privacy policy Terms and conditions