• 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

Laravel Get Days In Month From Month Number?

Log file is not being written in Laravel 5.5

Results page in other window

Insert database rows from columns of data from associative array of indexed arrays

Use same method for inertia response and json response Laravel Jetstream

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

browsersync doesn't work with XAMPP

Custom post type single page not working

Message: Set sys_temp_dir in your php.ini after installed composer

How to change product Image when variables are selected in Shop and Archive Pages?

Laravel Carbon throws error The format separator does not match

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

PHP/HTML: Creating A SubMenu

How to read laravel_session cookies saved in cookie memory of browser in client side?

In PHP, which is faster: preg_split or explode?

About Contact Privacy policy Terms and conditions