• 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 can I set a session variable in Drupal 8 and get it in a php script?

Last order would be re-order in wooCommerce. How is it possible?

Laravel query builder binding parameters more than once

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

PHP if in_array() how to get the key as well?

how to pass row id in href of a tag in codeigniter controller?

How can i update or reset my password without entering email field in laravel-8?

WordPress - Dynamically add user ID to the end of a URL

Laravel multi auth - Authentication user provider [] is not defined

Add bold text and line break into Laravel Notification Email

Auto increment id JSON

PHP Print to Network Printer

HTTP Range requests with php for Video Embedding for solving going to specific time in video (seek bar not work)

Adding custom body class to the custom archive pages

If action is on a different page do I use fwrite function

About Contact Privacy policy Terms and conditions