Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
laravel-mongodb
Commits
e0a3cda2
Commit
e0a3cda2
authored
May 25, 2015
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small tweak
parent
6ec9573b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
Model.php
src/Jenssegers/Mongodb/Model.php
+2
-7
No files found.
src/Jenssegers/Mongodb/Model.php
View file @
e0a3cda2
...
@@ -221,14 +221,9 @@ abstract class Model extends \Jenssegers\Eloquent\Model {
...
@@ -221,14 +221,9 @@ abstract class Model extends \Jenssegers\Eloquent\Model {
public
function
getAttribute
(
$key
)
public
function
getAttribute
(
$key
)
{
{
// Check if the key is an array dot notation.
// Check if the key is an array dot notation.
if
(
str_contains
(
$key
,
'.'
))
if
(
str_contains
(
$key
,
'.'
)
and
array_has
(
$this
->
attributes
,
$key
)
)
{
{
$attributes
=
array_dot
(
$this
->
attributes
);
return
$this
->
getAttributeValue
(
$key
);
if
(
array_key_exists
(
$key
,
$attributes
))
{
return
$this
->
getAttributeValue
(
$key
);
}
}
}
$camelKey
=
camel_case
(
$key
);
$camelKey
=
camel_case
(
$key
);
...
...
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