push()
method
April 4th ΚΌ21 1 year ago
push()
method$user = User::find(1);
$user->name = 'new name';
$user->team->name = $user->name.'\'s team';
// Instead of saving all relationships separately
β $user->save();
β $user->team->save();
// You can save all relationships in single line
β
$user->push();