kekos / booya-viewstate
Viewstate for Booya framework
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kekos/booya-viewstate
Requires
- php: >= 5.3.0
This package is auto-updated.
Last update: 2025-10-09 23:48:30 UTC
README
Remembers query string-parameters used to render one view when user is going back to first view from another view.
Install
You can install Booya ViewState via Composer:
composer require kekos/booya-viewstate
API
Use the viewstate as trait:
use Booya\LayoutController; use Booya\ViewState\ControllerTrait as ViewStateTrait; class IndexController extends LayoutController { use ViewStateTrait; public function index() { $this->viewState(); } public function other_action() { $this->viewState(); } }
In view index.php:
<a href="index/other_action<?php echo uh($flow_qs); ?>">Go to other view</a>
In view other_action.php:
<a href="index<?php echo uh($origin_qs); ?>">Go back to first view</a>
Redirect back to origin action
$this->redirectToOrigin('index');
Bugs and improvements
Report bugs in GitHub issues or feel free to make a pull request :-)
License
MIT