To generate flash message
Use the following code
For setting flash message
Session::flash('message', 'Data is successfully inserted');
To get the message in view page.First check message is existed with session key.Inside the condition print the messgae.
if (Session::has('message')) <p class="alert alert-success">{{ Session::get('message') }}</p> endif
If you get Session class error.Then use the session class in controller.
use Session
Question and answer is powered by AnsPress.io