• 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 string to lowercase AND then convert it to its original form in PHP, is it possible?

file_get_contents() without "Http" to access external URL [closed]

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

Assets not referencing to public folder (Laravel)

PHP: Telegram Bot: Insert line break to text message

merging two arrays with specified index

PHP Print to Network Printer

If you intend you use SMTP, add your SMTP Code after this Line

Remove product downloads section in woocommerce email notifications

SMTP "Error: DATA not accepted from server!" Opencart 2.3 on InMotionHosting

Array to string conversion

Populate Dynamic Dropdowns List in Codeigniter

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

How to KeyBy where multiple items have the same key

how to prevent float variables displaying as scientific notation when printing [duplicate]

About Contact Privacy policy Terms and conditions