php - Can I access current user data in blade?

I started using Laravel to create a small website, and i would like to access to logged user information.Auth::user()
My problem : i have a lot of views and each time i have to addAuth::user()
in each controller i create
is there any way to access toAuth::user()
directly from views
because i have a sidebar that contains logged user informations in all my views, i would like
i would like to avoid this way :
return view('dashboard.preference', ['profile' => Auth::user()]);
Answer
Solution:
It's ok Ifound the solution, below :
{{ Auth::user()->name }}
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: trying to access array offset on value of type null
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.