• 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

file_get_contents() without "Http" to access external URL [closed]

How to write PHP in XSLT

Use same method for inertia response and json response Laravel Jetstream

PHP DOTENV unable to load env vars

html-php form submission after validation through JavaScript [closed]

Shortcode or PHP inside a shortcode in Wordpress

Required field only if another field has a value, must be empty otherwise

hidden INPUT value not available in $_POST

Comma separated list from array with "and" before last element

how to validate form data in codeigniter 4

Laravel: Why is my variable not being set while it's in the construct function of the controller?

Which is faster php date functions or carbon?

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

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

Array to string conversion

About Contact Privacy policy Terms and conditions