If use wants to use Session :: make sure you add the Facade session:
use Session;
Instead, you can use the session helper. So you can use the codes below:
session()->user()->email; session()->get('user'); session()->flash('message', 'Hi there.');
See helpers for more details.
train_fox
source share