I am trying to get a filter in a collection, but I get an error:
"code": 500, "error_msg": "Undefined variable: request"
This is my code where I have the error. The request works in any part of the code, but not here...
$filterKarateka = $karatekasInMarket ->filter(function($item) {
return $item->id == $request->id_karateka;
})->first();
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire