I was wondering how to do a global variable to save me few lines of copy and pasting this lines. Array it probably and put them in one variable instead? I want to use this variable in other routes.
$providerEmail = Auth::user()->email;
$providerName = Auth::user()->first_name;
$providerSurname = Auth::user()->last_name;
$providerMobile = Auth::user()->mobile;
See Question&Answers more detail:os