# Aero\\Common\\Traits\\CanHaveAdditionalAttributes

This trait can be added to a model class. When added your model will have the ability to have additional attributes. The trait adds the following methods:

## additionals Method

This is the relationship method. This provides the relationship to **Aero\Common\Models\AdditionalAttribute**.

## hasAdditional Method

This method accepts a key string parameter and will do a database query to return a boolean value if the additional attribute with the key you provided exists.

## scopeHavingAdditional Method

This method is a [Laravel local scope method](https://laravel.com/docs/6.x/eloquent#local-scopes) that will allow you to scope a query on your module to require that the model has a specific additional attribute.

## getAdditionalAttribute Method

This method accepts an additional attributes key and allows you to get an additional attributes value using its key.

## saveAdditionalAttribute Method

This method accepts key and value parameters and will save the key and value you provide as an additional attribute.