Esempio n. 1
0
 /**
  * Gets the relations that will be seeded on to the provided rows
  *
  * @param   array    $keys        The keys for which to fetch related items
  * @param   closure  $constraint  The constraint function to limit related items
  * @return  array
  * @since   2.0.0
  **/
 protected function getRelations($keys, $constraint = null)
 {
     if (isset($constraint)) {
         call_user_func_array($constraint, array($this->related));
     }
     return $this->related->whereIn($this->relatedKey, array_unique($keys));
 }