I want to return multiple variable to my view.
$currentUser = Auth::user();
$needToBePassed = "Lorem Ipsum"
View::share ( 'currentUser', $currentUser);
This code works fine, however how can if I also want to share $needToBePassed
, what should I do?
Is rewriting it is a good practice?
View::share ( 'currentUser', $currentUser);
View::share ( 'needToBePassed', $needToBePassed);