-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
040124: Code example syntax fix for Eloquent Model Class page #2809
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a non blocking fix
docs/eloquent-models/model-class.txt
Outdated
[ 'name' => 'Earth', 'gravity' => 9.8, 'day_length' => '24 hours' ], | ||
[ 'name' => 'Mars', 'gravity' => 3.7, 'day_length' => '25 hours' ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I: based on the model definition and context, i think this is the correct field name
S:
[ 'name' => 'Earth', 'gravity' => 9.8, 'day_length' => '24 hours' ], | |
[ 'name' => 'Mars', 'gravity' => 3.7, 'day_length' => '25 hours' ], | |
[ 'name' => 'Earth', 'gravitational_force' => 9.8, 'day_length' => '24 hours' ], | |
[ 'name' => 'Mars', 'gravitational_force' => 3.7, 'day_length' => '25 hours' ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could prevent such errors by extracting this examples in dedicated .php files.
No JIRA
Code example fix (add quotes, update field name).
Staging:
https://preview-mongodbcchomongodb.gatsbyjs.io/laravel/040124-code-fix/eloquent-models/model-class/#customize-mass-assignment
Checklist