Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Session, Flash, Controller Active, Change Controller
I have in use this two methods:
$in_search = Session::get_flash('in_search');
And i need delete this flash when controller is changed.
Anyone can say me how to do this?
You don't have to.
When the session class loads at the start of a request, all session variables present in flash will be marked expired. In that request, their values will still be available.
When the request is finished, the cleanup will delete all session variables marked expired before the session data is written.
So unless you set a variable you get again or call keep_flash() for that variable, it will automatically be deleted at the end of the request.
This distinguishes flash variables from normal variables, which will exist until the session expires or you explicitly delete them.
Not work for me. i have product tab and client tab, for example, and when i search "mo" (search method use flash for do pagination with this search on real time) into product, and change to client tab, clients are filtred with "mo" flash almacened.
But i sort this problem using distinct flash variables.
That seems logical, that you use different variables for different search operations.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion