Fluxify
Fluxify

Reputation: 145

Laravel 5.2 auth User passing

I am new to laravel, Please bear with me How would I pass the current logged on user from the controller to the view?

Upvotes: 0

Views: 41

Answers (1)

Elias Soares
Elias Soares

Reputation: 10254

You don't need to pass it to the view.

Using the Auth facade, or auth() helper you have access to the current user:

// Use the Auth facade
{{ Auth::user()->email }}

// Or use the Auth helper:
{{ auth()->user()->email }}

Upvotes: 2

Related Questions