Skip to content

Commit 48d7cff

Browse files
author
Victor Isadov
authored
Merge pull request LaravelCollective#583 from shadoWalker89/patch-2
[5.7] Simplify isNestedModel() method, no need for if
2 parents 777b6d3 + d316b45 commit 48d7cff

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Eloquent/FormAccessible.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,7 @@ public function getFormValue($key)
6969
*/
7070
public function isNestedModel($key)
7171
{
72-
if (in_array($key, array_keys($this->getRelations()))) {
73-
return true;
74-
}
75-
76-
return false;
72+
return in_array($key, array_keys($this->getRelations()));
7773
}
7874

7975
/**

0 commit comments

Comments
 (0)