When I dd(back())
it shows all inside back() and one of its key is _previous which I want to use.
My code:
if($request->session()->attributes['_previous'] !== NULL)
// go back
else
// go to specific page
My problem:
The attributes is protected and I couldn't use _previous to go back if it's not null. Is there any suggestion I can use or some other approaches?
Appreciation