Returns true
if the item is present and is not null
:
if ($request->session()->has('users')) {
//
}
Returns true
if present, even if it's null
:
if ($request->session()->exists('users')) {
//
}
Returns true
if the item is null
or is not present:
if ($request->session()->missing('users')) {
//
}
Comments