getNameAttribute
christianschoenmakers opened this issue · comments
Add this function to the model to show the WP username in the default Auth::user()->name
function.
/**
* Usage to return user name
*
* @return string
*/
public function getNameAttribute(){
return $this->user_login;
}
You can do this by extending MrShan0\WordpressAuth\Models\WordpressUser
class and define your new eloquent model in config/auth.php