I am using Klein php routing for a simple app
the documentation is ok for using the library, however it is not good at how to implement the views
for instance I want to display a flash message on success/error/warning etc
i understand how klein can store the flash like this error message in documentation
$klein->respond(function ($request, $response, $service, $app) use ($klein) {
// Handle exceptions => flash the message and redirect to the referrer
$klein->onError(function ($klein, $err_msg) {
$klein->service()->flash($err_msg);
$klein->service()->back();
});
so for my success message i did this
$service->flash("Success", $type = 'success' );
but other than foreach on the $_SESSION __flash, i cannot see how to implement this in my view
i surely think there is a render() or something i am missing...i mean otherwise why call all this when i can just store my own msg in a session, doesnt make much sense to me
anyways, any help is always appreciated