Laravel добавить атрибут к модели
$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();
}