public static function back(?int $code = null)
  {
    if (isset(getallheaders()['Referer'])) {
      return Redirect::to(getallheaders()['Referer'], $code);
    }

    return new Redirect('/');
  }
public static function back(?int $code = null)
  {
    if (isset(getallheaders()['Referer'])) {
      return Redirect::to(getallheaders()['Referer'], $code);
    }

    return new Redirect('/');
  }
public static function back ( ? int $ code = null ) { if ( isset ( getallheaders ( ) [ 'Referer' ] ) ) { return Redirect :: to ( getallheaders ( ) [ 'Referer' ] , $ code ) ; } return new Redirect ( '/' ) ; }
Redirect back to the previous page

@param mixed ?int
@return void
Redirect back to the previous page