Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

Just guessing but have you tried to var_dump the output of sync() ?

Last updated 2 years ago.
0

The sync() method returns an array like so:

array(
	'attached' => array(),
	'detached' => array(),
	'updated' => array()
);

The keys should be pretty self-explanatory. Each will contain the IDs of the models, not the actual models.

So, to answer your question, if all three of these arrays are empty you can safely assume that no action was taken during the sync().

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

intrepidws intrepidws Joined 20 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.