Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
9871281b
Commit
9871281b
authored
May 13, 2013
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1880 from authman/master
Patch for ->push();
parents
d1ae2324
9ba285a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
laravel/database/eloquent/model.php
+4
-2
No files found.
laravel/database/eloquent/model.php
View file @
9871281b
...
@@ -335,7 +335,7 @@ abstract class Model {
...
@@ -335,7 +335,7 @@ abstract class Model {
*/
*/
public
function
push
()
public
function
push
()
{
{
$this
->
save
()
;
if
(
!
$this
->
save
())
return
false
;
// To sync all of the relationships to the database, we will simply spin through
// To sync all of the relationships to the database, we will simply spin through
// the relationships, calling the "push" method on each of the models in that
// the relationships, calling the "push" method on each of the models in that
...
@@ -349,9 +349,11 @@ abstract class Model {
...
@@ -349,9 +349,11 @@ abstract class Model {
foreach
(
$models
as
$model
)
foreach
(
$models
as
$model
)
{
{
$model
->
push
()
;
if
(
!
$model
->
push
())
return
false
;
}
}
}
}
return
true
;
}
}
/**
/**
...
...
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