mardi 26 février 2019

What's the easiest way of understanding when to use collections vs. model instances in Laravel?

In Laravel it's very confusing how there's ->first and ->first(), ->last and ->last(), and for relationships there's ->nameofyourrelationship and ->nameofyourrelationship(). Even still there's Model::find() and collection->find() . I find this amount of duplication very staggering and difficult to work with. This slows me down and lowers my satisfaction of working in the framework. Is there a good resource to sorting out these differences and making it less cumbersome to use Laravel?



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

Aucun commentaire:

Enregistrer un commentaire