• 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 pass data to all views in Laravel 5?

Get lat/lon from google maps url ftid (hex)

Encrypt in php and decrypt in Dart(flutter)

Generate random username based on full name php

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

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

MySQL default time format UTC or GMT?

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

Limit of log line written to Apache Errorlog from mod php error_log

WAMP Virtual Host not working

Having issue with matching rows in the database using PDO

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

CodeIgniter 4: Like and Dislike Functionality

codeigniter 4 running error first time with xampp

PHPExcel export HTML table to xlsx

About Contact Privacy policy Terms and conditions