PHPackages                             brainboxlabs/persist-query - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. brainboxlabs/persist-query

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

brainboxlabs/persist-query
==========================

Persist request query parameters in Laravel controllers

1.0.0(2y ago)04PHPPHP &gt;=7.2

Since May 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/BrainBoxLabs/persist-query)[ Packagist](https://packagist.org/packages/brainboxlabs/persist-query)[ RSS](/packages/brainboxlabs-persist-query/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Persist Query
-------------

[](#persist-query)

Persist request query parameters in Laravel controllers.

Use Case
--------

[](#use-case)

Suppose you run a bookstore website with two pages; `/home` and `/books`. The `/books` page lists all the books you have stored in your database and allows users to filter books by name and author. Also, suppose a user applies the following filters on the books listing page `/books?name=invisible&author=Mark`. After navigating away from this page, say to `/home` and back to `/books` the applied filters will be lost. This package allows users to continue where they left off after navigating back to `/books` by restoring the page to its last known state `/books?name=invisible&author=Mark`.

Installation
------------

[](#installation)

```
composer require brainboxlabs/persist-query

```

Add Persist Query To Your Laravel Controller
--------------------------------------------

[](#add-persist-query-to-your-laravel-controller)

```
