Laravel Pagination links not including other GET parameters

When there are some GET parameters in the URL,
eg: http://yoursiteurl.com/search-vehicle-profile?startdate=07%2F28%2F2017&enddate=08%2F01%2F2017&vin_number=2HGFC2F89GH033029, the pagination links produced only contain the page parameter and nothing else as http://yoursiteurl.com/search-vehicle-profile?page=2

This happens when you use link in your blade as {{ $vehicleHistoryDetail->link() }}

so rather than just using that, you need to you appends function as shown below

{{ $vehicleHistoryDetail->appends(request()->input())->links() }}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s