当前关联数据.

@param $attribute

@return Collection|Store[]
515764
public function getAttached($attribute): Collection
    {
        /** @var Collection $coll */
        $coll = $this->getRelationValue($attribute);

        return $coll->map(function ($data) {
            return Finder::createStore($data);
        });
    }
332418
public function getCascadeOwnerPart(PHPAttribute $attribute)
    {
        $cascadeAttributes = [];

        if (in_array($attribute->getCascadePersist(), ['both', 'owner'])) {
            $cascadeAttributes[] = '"persist"';
        }

        if (in_array($attribute->getCascadeRemove(), ['both', 'owner'])) {
            $cascadeAttributes[] = '"remove"';
        }

        if (count($cascadeAttributes) > 0) {
            return ', cascade={' . implode(', ', $cascadeAttributes) . '}';
        } else {
            return '';
        }
    }
1126040
private function cacheAttributeItems($attribute) {
		$nameItems = [];
		$unsupportItems = [];

		$_attribute = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $attribute)))) . 'Items';
		if($this->hasMethod($_attribute)) {
			$attributeitems = $this->$_attribute();

			$_defaultNameItems = $attributeitems[0];
			if($_defaultNameItems && is_array($_defaultNameItems)) {
				$_scenario = [];
				foreach($this->getActiveValidators($attribute) as $validator) {
					if($validator instanceof RangeValidator) {
						$_scenario = ArrayHelper::merge($_scenario, ArrayHelper::filter($_defaultNameItems, $validator->range));
					}
				}
				$nameItems[$this->scenario] = array_unique($_scenario);
				$nameItems['_default'] = $_defaultNameItems;
			}

			if(isset($attributeitems[1]) && is_array($attributeitems[1])) {
				$unsupportItems = $attributeitems[1];
			}
		}

		$this->_attributeNameItemsList[$attribute] = $nameItems;
		$this->_attributeUnsupportItemsList[$attribute] = $unsupportItems;
	}
927230
protected function getValue($attribute)
    {
        if (! is_null($value = Arr::get($this->data, $attribute))) {
            return $value;
        } else if (! is_null($value = Arr::get($this->files, $attribute))) {
            return $value;
        }
    }
196735
protected function processAttributes($attributes)
    {
        if (!$attributes) {
            return [];
        }

        $attributes = explode(',', $attributes);

        foreach ($attributes as $key => $attribute) {
            $attributes[$key] = trim($attribute);
        }

        return $attributes;
    }
402767
public function create($attributes)
    {
        $attributes = $this->castRequest($attributes);
        $instance   = $this->model->newInstance($attributes);

        event(implode('-', $this->tag).'.entity.creating', [$this, $instance, $attributes]);

        $created = $instance->save();

        event(implode('-', $this->tag).'.entity.created', [$this, $instance, $attributes]);

        return [
            $created,
            $instance,
        ];
    }
48022
protected function selectAttributes($attributes = ['*'])
    {
        $attributes = $attributes ?: ['*'];

        if ($attributes == ['*'] && $this->attributes != ['*']) {
            $attributes = $this->attributes;
        }

        return $attributes;
    }
947819
public function attributes($attributes = null)
    {
        if (null === $attributes) {
            return $this->attributes;
        }

        $this->attributes = $attributes;

        return $this;
    }
1229243
public function forgetAttribute($attribute)
    {
        if ($attribute === 'class') {
            $this->classes = [];

            return $this;
        }

        if (isset($this->attributes[$attribute])) {
            unset($this->attributes[$attribute]);
        }

        return $this;
    }
529423
public function getAttributeText($attribute) {
		$items = $this->getAttributeItems($attribute, 0, false, true);

		return isset($items[$this->$attribute]) ? $items[$this->$attribute] : null;
	}
240724
public function attr($attribute)
    {
        if (!$this->attributes instanceof EntityAttributeContainer) {
            $this->attributes = $this->createEntityAttributeContainer();
        }

        return $this->attributes->attr($attribute);
    }
540209
public function addAttribute(Attribute$attribute) : Attributes
	{
		$this->getItems();//max sure is array
		$this->attributes[$attribute->getName()] = $attribute;
		return $this;
	}
990370
protected function parseAttributes(array $attributes)
    {
        $result = [];

        foreach ($attributes as $attribute => $value) {
            $result[$this->parseConstantValue($attribute)] = $value;
        }

        return $result;
    }
779874
protected function prepareAttributes(array $attributes)
    {
        return array_map(function ($attribute) {
            return ($attribute instanceof DateTime)
                ? $this->fromDateTime($attribute)
                : (string) $attribute;
        }, $attributes);
    }
1331468
public function archive($attributes)
    {
        $arraybleAttributes = array_map(function($attributes) {
           return $this->getArrayble($attributes);
        }, func_get_args());

        $params = array_merge([function() {
            return new static(func_get_args());
        }, $this->attributes], $arraybleAttributes);

        return new static(call_user_func_array('array_map', $params));
    }
1115640
public function getValidations($attribute = null)
    {
        if (is_null($attribute)) {
            return $this->validations;
        } elseif (isset($this->validations[$attribute])) {
            return $this->validations[$attribute];
        } else {
            return [];
        }
    }
93377
protected function getAttributes( array $attributes ) : array
   {

      $result = [];

      foreach ( $attributes as $attribute )
      {
         if ( ! ( $attribute instanceof Descriptor ) )
         {
            continue;
         }
         $result[ $attribute->getName() ] = $attribute;
      }

      return $result;

   }