Laravel Dodaj atrybut do modelu
$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();
}