1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/theres-great-value-in-understanding-how-object-state-of-models-works-this-is-mostly-relevant-in-feature-tests-because-they-touch-many-parts-of-your-codebase-in-one-phplaravel-app-state.md
2021-04-06 18:27:18 +02:00

673 B

title tweet_id thread_slug author_username images created_at slug
There's great value in understanding how object state of Models works. This is mostly relevant in (Feature) tests because they touch many parts of your codebase in one PHP/Laravel App state 1308082893865005068 1-rt-1-tip samuelstancl
https://pbs.twimg.com/media/Eic9xP2XsAoo8ay.png
2021-04-06T16:07:40+00:00 theres-great-value-in-understanding-how-object-state-of-models-works-this-is-mostly-relevant-in-feature-tests-because-they-touch-many-parts-of-your-codebase-in-one-phplaravel-app-state

For example, use $model->is($anotherModel) to check if they refer to the same row.