After deleting a record and generating an event (with a record), an error occurs. If you delete after creating events, then there is no error, but the error itself is strange. Moreover, the recording is deleted and the recording gets into the event, a strange error
{"message":"No query results for model [App\\Models\\Friends].","exception":"Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException
if ($friendship) {
$countIncoming = DB::table('friends')->where([
['confirm', '=', $confirm],
[$columnCountFrienship, '=', $id1]
])->count() - 1;
$friendship->delete();
event(new RequestFriendshipCancel($friendship, $id1));
event(new RequestFriendshipCancel($friendship, $id2, $countIncoming, true));
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2OdFIp0
via IFTTT
Aucun commentaire:
Enregistrer un commentaire