DETERMINATION PROCESSING OF Larvel DB PROCESSING RESULT

Asked 2 years ago, Updated 2 years ago, 384 views

US>Larvel Model
How is BEST to determine if the database processing transaction went well?

CertainModel::insert([
         'id' = > $request->id
]);

laravel

2022-09-30 21:58

1 Answers

If the transaction fails, an exception is thrown, so the code normally reaches the end point = Success.


2022-09-30 21:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.