• 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

Convert date and time to Jalali in Laravel

How to get page number on dompdf PDF when using "view"

Nginx disallowing execution of PHP in uploads directory with Magento

Group data in a multidimensional array based on two columns

how to make my own auto increment in php?

Apply session id from request header

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

How can I convert from a{a{} b{}} to a[a[],b[]] using php preg_match?

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

Nginx RTMP not recording

Popup Window and PHP form

Printing more than one array using print_r or any other function in php

How do I pass the dynamic output of a php variable or php function to a CSS variable?

Valet, Xdebug after reboot Big Sur not working

Convert regular text to array using notepad++

About Contact Privacy policy Terms and conditions