Alert::get() is empty
Anisi opened this issue · comments
Hi
I have these lines in controller:
Alert::success('زبان مورد نظر با موفقیت حذف شد.');
return back();
And these in view:
@foreach (Alert::get() as $alert)
<ul>
<li class="alertclass="alert alert-{{ $alert->class }}">{{ $alert->message }}</li>
</ul>
@endforeach
but Alert::get()
is always empty. All settings are default and my session driver is file.
@Anisi the array session driver does not persist data across requests, so it won't be able to store your messages for subsequent requests.
@suwardany
Thanks
What about file?
The file driver should work fine.
I made a mistake. Cache driver is array and session driver is file, but still the same problem!
I'm unable to reproduce that issue on a fresh laravel installation using the exact info you provided. I would suggest you give it a try on a fresh installation and try to debug down the road from there.