public function setCompletedAttribute($completed) { $this->attributes['completed'] = (int) (bool) $completed; }