• 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

Transform array, set each array element with parent key php

Laravel Multi-language routes without prefix

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

Array to string conversion

How do I call Validator from a namespace with an already existing Validator class

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

Two buttons one form

Fatal error: Array callback has to contain indices 0 and 1

I want to display default profile image if user do not have profile image

phpseclib 2.0 can not use Composer to create autoload

Dropdown with current value from Mysql

Can't call javascript alert alertify library from PHP

Failing validation doesn't stop code execution in livewire component

Transpose and flatten multiple rows of array data [duplicate]

About Contact Privacy policy Terms and conditions