when i dump( Auth::user());
that show me
User {#220 ▼
#attributes: array:10 [▼
"id" => "8"
"name" => "Vitaliy"
"email" => "[email protected]"
"password" => "=)"
"remember_token" => null
"created_at" => "2017-10-19 13:11:21"
"updated_at" => "2017-10-19 13:11:21"
"phone" => "412412412"
"city" => "Dnipro"
"district" => "Leneinskiy"
]
#original: array:10 [▶]
....
}
In protected property we saw the info from user table
How can i get #attributes
?
Or say me please how i can take all info about logged User.
Auth::user()->name
Auth::user()->email
etc...
Auth::User()->getAttributes();
This will get all the attributes of the logged in user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With