I am stuck a bit, I have a little form and auth system - Sentry.
1) Get data from Input and validate it. It's okay, I get it, check with rules, set messageBag
<?php
$validation->getMessageBag()->setFormat(Config::get('project/config.errors_delimiters'));
?>
Then I return page withErrors
method. And prints validation
errors.
2) Next step will be to login users, for example. This mean, that I need to use a Sentry manual.
But now I have a problem: how to show errors or store errors. I have:
- Error messages via validation
- Error messages via Sentry
- Custom Errors
- Success messages
- Info messages
Which the best practice to store this messages? How to send it to a view? And how to parse it in a view? Also how to set delimiters style?
Of course I can create tons of flash, session, and other types of data and then send this into a view, but I think it is ridiculous. I think there is a simple method which can help me.