I’m calling this:
request()->validate($rules);
If there is an error, then Laravel will flash the errors to the session and return to the previous page.
How do I get the errors that Laravel flashed to session from within PHP?
I am not referring to getting errors in a Blade template, or using a Blade template directive.
For example, how could I get errors if I was coding within a class file.
2
Answers
I found out how to do it
Well i dont really understand what you mean by getting the errors from within PHP code.