我的控制器中有这段代码
public function deleteDependent(Request $request)
{
HMO::deleteDependent($request);
if(session()->has('hmo_id'))
{
session()->flash('status', 'Task was successful!');
return redirect()->route('edit-user', request('hmo_id'));
}
else
{
return redirect()->route('edit', request('hmo_id'));
}
}
这也是我在视野中的代码
<div class="col-lg-6 col-lg-offset-1">
@if(session()->has('status'))
<div class="alert alert-success">
<strong>Success!</strong> your request is waiting for Admin approval.
</div>
@endif
</div>
重定向工作正常,但视图未读取会话闪存, 我错过了什么?