Laravel Adicione atributo ao modelo
$user = User::find(1);
// add occupation to user instance
$user->setAttribute('occupation', 'Web Developer');
Yingfufu
$user = User::find(1);
// add occupation to user instance
$user->setAttribute('occupation', 'Web Developer');
public function getAvailabilityAttribute()
{
return $this->calculateAvailability();
}