Esempio n. 1
0
 /**
  * Gather a copy of the data filled with any missing attributes.
  *
  * @param  string  $attribute
  * @return array
  */
 protected function initializeAttributeOnData($attribute)
 {
     if (!Str::contains($attribute, '*') || Str::endsWith($attribute, '*')) {
         return $this->data;
     }
     $data = $this->data;
     return data_fill($data, $attribute, null);
 }
Esempio n. 2
0
 /**
  * Gather a copy of the attribute data filled with any missing attributes.
  *
  * @param  string  $attribute
  * @return array
  */
 protected function initializeAttributeOnData($attribute)
 {
     $explicitPath = $this->getLeadingExplicitAttributePath($attribute);
     $data = $this->extractDataFromPath($explicitPath);
     if (!Str::contains($attribute, '*') || Str::endsWith($attribute, '*')) {
         return $data;
     }
     return data_fill($data, $attribute, null);
 }