Skip to content

Commit 1665cb6

Browse files
themsaidtaylorotwell
authored andcommitted
breaking change
1 parent fc52aa3 commit 1665cb6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

upgrade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ However, in Laravel 5.5, the alias will be used exactly as it is given. If you w
138138

139139
$users = User::withCount('foo as bar_count')->get();
140140

141+
142+
#### Model methods & attribute names
143+
144+
To prevent accessing model private properties while using array access it's now not possible for you to have a method inside the model class with the same name as a model attribute or property, having this will throw exceptions while accessing the model attributes via array access `$user['name']` or using `data_get($user, 'name')`.
145+
141146
### Exception Format
142147

143148
In Laravel 5.5, all exceptions, including validation exceptions, are converted into HTTP responses by the exception handler. In addition, the default format for JSON validation errors has changed. The new format conforms to the following convention:

0 commit comments

Comments
 (0)