@if (session()->has('status')) @php $data = session('status'); @endphp @if (isset($data['error_status']) && $data['error_status'] != null) {{-- // if the status is 0 then it means success --}} @if ($data['error_status'] == '0') @php session()->forget('status.error_status'); //Session::forget('status.error_status'); @endphp {{-- // if the status is 1 that means validation error, // if the status is 2 thats means a query or exception error --}} @elseif($data['error_status'] == '1' || $data['error_status'] == '2') {{-- // the error status is 3 then it means a authorization error --}} @elseif($data['error_status'] == '3') @endif @endif @endif @if ($errors->any()) @foreach ($errors->all() as $error) @endforeach @endif {{-- javascript based notification trigger --}}