mercredi 3 janvier 2018

How edit function from working from collection to single variable?

Who can explain what it code do:

$parts = $this->getParts();
$friendlyUrlIndex = $parts->search(function (FriendlyUrl $friendlyUrl) use ($entityType) {
                return $friendlyUrl->entity_type == $entityType;
            });

            return $parts[$friendlyUrlIndex];

$parts - it's collection.

How edit this function for working with single variable?



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

Aucun commentaire:

Enregistrer un commentaire