mzur / kirby-flash Goto Github PK
View Code? Open in Web Editor NEWThis project forked from jevets/kirby-flash
Stores data for the next request in the session; wipes data upon next page load
License: MIT License
This project forked from jevets/kirby-flash
Stores data for the next request in the session; wipes data upon next page load
License: MIT License
kirby-flash
works really well when I want to save a success message or an error for the next page load, and I return a redirect from a controller.
However, I'd like to use kirby-flash
in situations where I render a 422 response immediately after a form error. In this case, I'd like the flash error message to show up in the response for the current request (and not the subsequent page load).
Rails has a similar pattern, and the flash object has a now
method to support this use case.
Would you be open to this feature?
I think the cleanest API would probably be to support a 3rd, optional boolean argument called "now" on flash->set()
and the flash
helper. Under the hood, this would store the data in a separate temporary array on the Flash
instance, which would not be persisted to the session. flash
and flash->get()
would read from both the session data and the temporary data when looking for a key.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.