Is this a regular request, or an ajax request?
Oct 31, 2018
5
Level 1
Flash data missing from request
Hey,
I'm passing flash data to pop an alert in the main view but it's always missing. Strange because i'm using the same system as always.
Tried with:
request()->session()->flash('alert', $alert);
// and
return redirect()->route('rates')->with('alert', $alert);
And in the view:
@if(Request::has('alert'))
// and
@if(request()->session()->has('alert'))
But it keeps returning false
I did some routing modifications and I checked if i was applying web middleware twice but no. It's all correct:
// Provider
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/admin.php'));
// routes files
/**
* Back Office
*/
Route::group(['namespace' => 'Admin', 'middleware' => ['auth']], function () {
Level 1
oh... nevermind. I was using Request::has() instead of Session::has().
1 like
Please or to participate in this conversation.