G
G
GaserV2016-09-29 18:06:04
Laravel
GaserV, 2016-09-29 18:06:04

How to correctly pass a logged in user to all pages?

Good afternoon. After authorization, a session is created. How can I display information about the user on all the necessary pages? Now in each method, necessary, I return the user. Is there any more generic solution?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Perin, 2016-09-29
@GaserV

View composer

W
WebDev, 2016-09-29
@kirill-93

stackoverflow.com/questions/29715813/laravel-5-glo...
You can also access the user via auth()->user()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question