Skip to content
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

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

ccho-mongodb
Copy link
Contributor

@ccho-mongodb ccho-mongodb commented Apr 1, 2024

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

  • Add tests and ensure they pass
  • Add an entry to the CHANGELOG.md file
  • Update documentation for new features

@ccho-mongodb ccho-mongodb changed the title 040124: Code example syntax fix 040124: Code example syntax fix for Eloquent Model Class page Apr 1, 2024
Copy link
Contributor

@rustagir rustagir left a 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

Comment on lines 252 to 253
[ 'name' => 'Earth', 'gravity' => 9.8, 'day_length' => '24 hours' ],
[ 'name' => 'Mars', 'gravity' => 3.7, 'day_length' => '25 hours' ],
Copy link
Contributor

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:

Suggested change
[ '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' ],

@ccho-mongodb ccho-mongodb marked this pull request as ready for review April 1, 2024 21:26
@ccho-mongodb ccho-mongodb requested a review from a team as a code owner April 1, 2024 21:26
@ccho-mongodb ccho-mongodb requested a review from jmikola April 1, 2024 21:26
Copy link
Member

@GromNaN GromNaN left a 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.

@ccho-mongodb ccho-mongodb merged commit e959925 into mongodb:4.1 Apr 4, 2024
15 checks passed
@ccho-mongodb ccho-mongodb deleted the 040124-code-fix branch April 4, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants