6 Tricks for Laravel Collections

Jeff Madsen has a new post covering six tricks for working with Laravel collections.

His tricks cover the follow methods:

  • find()
  • where()
  • where() & lists()
  • implode()
  • groupBy()
  • as a union

Using find with an array is one I never remember:

$collection = AppPerson::find([1, 2, 3]);

Give the post a read and I’m sure you’ll pick up a few tips and tricks.

Visit Resource →


Filed in: Laravel Tutorials / Collections


Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Laravel + Vue.JS developer
Remote or in Toronto Canada
Star Dot Hosting Inc
Full Stack or Back-End Developer
Alexandria, VA; Tallahassee, FL; Orlando, FL
Marketing for Change
Senior Quality Assurance Engineer
Remote
Bisnow Media
Senior PHP/Laravel Developer: Your Dream Work Environment
Remote
iPhone Photography School
Senior Software Engineer
Remote or San Francisco
Curology
Laravel Developer
Las Vegas, NV
V Shred
R&D Developer
Denver, CO
booj