• 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 to MODIFY a Google Docs document via API using search-and-replace?

Laravel Sanctum CSRF not authenticating

Currently Using CodeIgniter Framework i have an Error

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

How to disable widget block editor of WordPress?

How to get transaction details in notify_url page in paypal

Attempted to call an undefined method named "get" of class "MailController"

php retrieve specific data onclick from database in a list format

Session timeout in Yii2

Creating Combinations of Elements

How can I make Laravel return a custom error for a JSON REST API

How to use PHPCBF to fix one issue at a time?

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

How to install php yaml on CentOs?

Adding reCAPTCHA v2 into my PHP file

About Contact Privacy policy Terms and conditions