jeudi 31 mai 2018

first query is sending data even though the last query is failing in a multiple query set up

I am trying to pass multiple query for execution for which i don't want data from 1st query to execute if the last query is having issues.

$user = Gateway::user()->storeDoctorUser(\Input::all(), 'doctor'); 
$address = Gateway::address()->storeDoctorAddress(\Input::all(), $user->id);
$doctors = Gateway::doctor()->storeDoctorData(\Input::all(), $user->id,$address->id);

As stated above how to solve this issue.If somehow the doctor query is failing then also user and address are working ,which should not happen .If the last one fails all should fail.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2kCxoO0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire