• 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

In PHP, which is faster: preg_split or explode?

Change user role if checkout custom checkbox is checked in WooCommerce

XSS attack still works despite htmlspecialchars() doing its work

Transpose and flatten multiple rows of array data [duplicate]

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

How to submit the custom form data in database in WordPress without plugin using ajax?

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

Entity provider not working in security.yml php symfony3.4 ({"code":401,"message":"bad credentials"}.)

Group rows by column and sum another column within groups [duplicate]

Laravel 8 Multiple Relationships for Factory

I want to display default profile image if user do not have profile image

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

Fetch files from next cloud storage and display in Laravel website

Laravel Unknown Column 'updated_at'

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

About Contact Privacy policy Terms and conditions