i found out there are several ways to access a model attribute:
// In Model Class 1.
public function getUsername()
{
return $this->username;
}
// OR 2.
public function getUsername()
{
return $this->attributes['username'];
}
and then calling methods,
or just simply call the attribute when needed:
// 3.
$user->username;
What is the difference between these 3 methods? and which to use? best practice, performance and OOP?