'float', 'is_allowed_edit_commission' => 'bool', 'is_inhouse' => 'bool', 'active' => 'bool', 'contact_emails' => 'array' ]; protected $fillable = [ 'name', 'percentage', 'is_allowed_edit_commission', 'is_inhouse', 'contact_emails', 'active' ]; public function bookings() { return $this->hasMany(Booking::class); } public function booking_service_items() { return $this->hasMany(BookingServiceItem::class); } public function setPercentageAttribute($value) { $this->attributes['percentage'] = Util::_clean_float($value); } public function getPercentageAttribute() { return Util::_number_format($this->attributes['percentage']); } public function getPercentageRaw() { return isset($this->attributes['percentage']) ? $this->attributes['percentage'] : 0; } }