mardi 23 juillet 2019

After deleting a record and generating an event (with a record), an error occurs. No query results for model

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.

{"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));



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire