Laravel addieren Sie Attribut zum Modell
$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();
}