Call to undefined method Illuminate\Database\Query\Builder::getUsername()
That is the error that i am getting when i call
Home.blade.php
<p>{{ Auth::user()->getUsername() }}</p>
App\User.php
public function getUsername(){
$username = Auth::user()->username;
return $username;
}
This has been bothering me all day i have yet to find the answer. Can someone please help me and explain what i did wrong