Merge branch 'staging' of github.com:laravel/laravel into staging

This commit is contained in:
Taylor Otwell 2012-04-18 20:38:46 -05:00
commit ff94d16630
2 changed files with 15 additions and 1 deletions

View File

@ -65,7 +65,10 @@ public function eagerly_constrain($results)
// are looking for the parent of a child model in this relationship.
foreach ($results as $result)
{
$keys[] = $result->{$this->foreign_key()};
if ( ! is_null($key = $result->{$this->foreign_key()}))
{
$keys[] = $key;
}
}
$this->table->where_in($this->model->key(), array_unique($keys));

View File

@ -26,6 +26,17 @@ function __($key, $replacements = array(), $language = null)
return Laravel\Lang::line($key, $replacements, $language);
}
/**
* Dump the given value and kill the script.
*
* @param mixed $value
* @return void
*/
function dd($value)
{
die(var_dump($value));
}
/**
* Get an item from an array using "dot" notation.
*