• 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

Symfony/Form add attribute based on the data

wordpress function breaks wp-admin

Declaration of OMDb::query(string $statement) must be compatible with PDO::query

Remove country code from phone number?

PHP returning an error message and false

Doctrine 2 mapping referencing unique key

Is there a way to use Foundry Model for Authentification inside Functional Tests?

How to install php_imagick on wamp64

PHP -> Next nearest date defined by array of days in week

Reducing authentication calls on external API (Laravel 5.6)

Dropdown with current value from Mysql

How to debug in WooCommerce 3+

target [LaravelFortifyContractsRegisterViewResponse] is not instantiable

Unit (real unit test) of test laravel relationship

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

About Contact Privacy policy Terms and conditions