Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Commit

Permalink
nitpicks
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Oct 30, 2017
1 parent 100764c commit 8fe1ffb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
preset: laravel

linting: true
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to `spatie/laravel-paginateroute` will be documented in this file.

## 2.6.0 - 2017-10-30
- preserve query string on pagination urls

## 2.5.0 - 2017-05-15
- add support for Arabic

Expand Down
7 changes: 5 additions & 2 deletions src/PaginateRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Contracts\Pagination\Paginator;
use Illuminate\Contracts\Routing\UrlGenerator;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Request;

class PaginateRoute
{
Expand Down Expand Up @@ -301,9 +302,11 @@ public function pageUrl($page, $full = false)
$url = str_replace(['{'.$parameterName.'}', '{'.$parameterName.'?}'], $parameterValue, $url);
}

$query = \Request::getQueryString();
$query = Request::getQueryString();

return $this->urlGenerator->to($url).($query ? '?'.$query : '');
return $this->urlGenerator->to($url).$query
? '?'.$query
: '';
}

/**
Expand Down

0 comments on commit 8fe1ffb

Please sign in to comment.