Aura.Session
Aura.Session copied to clipboard
Feature Request - getOnce?
Is there the possibility we could get a getOnce
function as we've dealt with a few applications that we want to use setFlash
for - but sometimes there are redirects going on, which mean the flash is lost.
What we find ourselves doing is
$previousConfiguration = Su::$session->get('previousConfiguration', false);
if( $previousConfiguration ){
Su::$session->set('previousConfiguration', false);
}
What would be great is if this functionality could be added by default, e.g
$session->getOnce('previousConfiguration', false);`
Which then unsets the value after its been used?
Many thanks for your time and effort in the project :)
but sometimes there are redirects going on, which mean the flash is lost
Does keepFlash
method https://github.com/auraphp/Aura.Session#keeping-and-clearing-flash-values helps in that case?
Closing this issue. This can be implemented outside also.