Created
October 31, 2016 14:31
-
-
Save inxilpro/22d31a4fa7e9e3ff276ab8810c0322bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form> | |
| @statusalert | |
| My form ... | |
| </form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function showForm(Request $request) { | |
| $request->session()->now('status-danger', 'There was an error!'); | |
| } | |
| // Or ... | |
| function processForm(Request $request) { | |
| if ($failed_for_some_reason) { | |
| return redirect()->back()->flash('status-danger', 'Oops! There was an error.'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment