if you want to check the value is exist in the session variable, try this code:
@if (Session::has('success_message')) {{ Session::get('success_message') }} @endif @if (Session::has('error_message')) {{ Session::get('error_message') }} @endif
if you using Laravel blade template for your project so, it will be very helpful for you.
Question and answer is powered by AnsPress.io