コード例 #1
0
ファイル: Validator.php プロジェクト: risan/framework
 /**
  * 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);
 }
コード例 #2
0
ファイル: Validator.php プロジェクト: chriss-inno/misscontest
 /**
  * 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);
 }