• 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

LARAVEL: How to fetch id dynamically in a query builder?

How to get total pages of PDF with FPDF?

How to send image,audio or video through the WhatsApp API - PHP

MySQL order by field in Eloquent

how to create html table in php

How to execute sql code based on fetch array

Inserting Country Selection into MySQL PHP [duplicate]

enroll_table three field fetch to payment form to create payment field in laravel 5.5

I want a way to give path to my files which are outside of public folder in laravel

How to change the app environment at run time?

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

PHP Array split string and Integers

php - add comma thousands separator but remove trailing zeros

Unable to Edit config.inc.php

php 7 php.ini upload_max_filesize not working

About Contact Privacy policy Terms and conditions