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
b4db0f1b
Commit
b4db0f1b
authored
Jun 03, 2012
by
Jason Lewis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small change moving array to a variable.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
parent
ab2fcb84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
laravel/database/eloquent/model.php
+3
-1
No files found.
laravel/database/eloquent/model.php
View file @
b4db0f1b
...
@@ -744,10 +744,12 @@ abstract class Model {
...
@@ -744,10 +744,12 @@ abstract class Model {
return
static
::
$$method
;
return
static
::
$$method
;
}
}
$underscored
=
array
(
'with'
,
'find'
)
// Some methods need to be accessed both staticly and non-staticly so we'll
// Some methods need to be accessed both staticly and non-staticly so we'll
// keep underscored methods of those methods and intercept calls to them
// keep underscored methods of those methods and intercept calls to them
// here so they can be called either way on the model instance.
// here so they can be called either way on the model instance.
if
(
in_array
(
$method
,
array
(
'with'
,
'find'
)
))
if
(
in_array
(
$method
,
$underscored
))
{
{
return
call_user_func_array
(
array
(
$this
,
'_'
.
$method
),
$parameters
);
return
call_user_func_array
(
array
(
$this
,
'_'
.
$method
),
$parameters
);
}
}
...
...
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