• 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 can I easily switch between PHP versions on Mac OSX?

Target Individual Form Instance/Counter Inside A PHP While Loop

How to convert a carbon into string, to take the date only?

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

PHP - Check if string contains words longer than 4 characters, then include "+ *", and for those shorter than 4 characters include only "*"

I can't delete my image when it is liked because of the foreign key in mysql

Add New Parameter to Existing URL using htaccess

Implode array with array of glue strings

How to get total pages of PDF with FPDF?

cakephp save drag and drop list order to database

Laravel lang slug in url

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]

Laravel display validation error

Only on Firefox "Loading failed for the <script> with source"

how to remove white space in select 2

About Contact Privacy policy Terms and conditions