Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
ff94d166
Commit
ff94d166
authored
Apr 19, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'staging' of github.com:laravel/laravel into staging
parents
51f5fdd0
b7ac6674
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
belongs_to.php
laravel/database/eloquent/relationships/belongs_to.php
+4
-1
helpers.php
laravel/helpers.php
+11
-0
No files found.
laravel/database/eloquent/relationships/belongs_to.php
View file @
ff94d166
...
@@ -65,7 +65,10 @@ class Belongs_To extends Relationship {
...
@@ -65,7 +65,10 @@ class Belongs_To extends Relationship {
// are looking for the parent of a child model in this relationship.
// are looking for the parent of a child model in this relationship.
foreach
(
$results
as
$result
)
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
));
$this
->
table
->
where_in
(
$this
->
model
->
key
(),
array_unique
(
$keys
));
...
...
laravel/helpers.php
View file @
ff94d166
...
@@ -26,6 +26,17 @@ function __($key, $replacements = array(), $language = null)
...
@@ -26,6 +26,17 @@ function __($key, $replacements = array(), $language = null)
return
Laravel\Lang
::
line
(
$key
,
$replacements
,
$language
);
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.
* Get an item from an array using "dot" notation.
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment