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

In case this is only example, you need to do input validation and that solves your problem. (see manual)

In case that this are real tables merge them.

0

I would use 'transactions'. They were designed just for such cases.

http://laravel.com/docs/5.0/database (chapter 'Database Transactions')

http://fideloper.com/laravel-database-transactions

Last updated 7 years ago.
0

Sign in to participate in this thread!

Cloudways

Your banner here too?

archer3cl archer3cl archer3cl Joined 7 Mar 2015

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.