• 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 Nova Dependency Container what are the allowed resource properties other than id in dependsOn

How do I call Validator from a namespace with an already existing Validator class

Laravel after login Two factor not working

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

I cannot create a auto generated date time in mysql workbench

Symfony redirect if already loggedin from login page

"Unable to load dynamic library 'pdo_sqlsrv.so' "Cenos7 PHP7.2.10

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

Custom API and cunsuming in php?

Laravel passport auth token not working after moving to different server

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

Convert date and time to Jalali in Laravel

Adding reCAPTCHA v2 into my PHP file

Sort multidimensional array by column value within a column

How to create custom authentication in laravel 8?

About Contact Privacy policy Terms and conditions