Collections

DD and Dump Are coming to Collections in Laravel 5.5
Laravel 5.5 / June 27, 2017

DD and Dump Are coming to Collections in Laravel 5.5

Coming to Laravel 5.5 is two brand new methods on the Collections class that will make debugging easier than ever before. These are “dd” and “dump”.

Read more…
Bring Laravel Collections to JavaScript with Collect.js
Laravel Packages / June 17, 2017

Bring Laravel Collections to JavaScript with Collect.js

Collect.js is a port of Laravel Collections to JavaScript. It’s dependency free and makes working with arrays and objects easy.

Read more…
Laravel 5.4.17 is released
News / April 03, 2017

Laravel 5.4.17 is released

Today Laravel released v5.4.17 and it includes several new features including a Collection Times method, improvements to the migrations, and more. Collection::Times() Thanks to Joseph Silber the Collection system received a new “Times” method that allows you to do things like this: $slugs = Collection::times(5, function ($number) { return ‘slug-‘.$number; }); // [‘slug-1’, ‘slug-2’, ‘slug-3’, …

Laravel Collections “when” Method
Laravel 5.4 / February 16, 2017

Laravel Collections “when” Method

Starting at v5.4.12, Laravel Collections now includes a when method that allows you to perform conditional actions on the items without breaking the chain. Like all the other Laravel Collection methods this one can have a lot of use cases but one example that comes to mind is being able to filter based on a …

Laravel Collection “tap” Method
Laravel 5.4 / February 13, 2017

Laravel Collection “tap” Method

Laravel 5.4.10 introduces a new `tap` method on collections which allow you to “tap” into the collection at a specific point and do something with the results while not affecting the main collection.

Read more…
Laravel Collections Now Include A Partition Method
News / December 15, 2016

Laravel Collections Now Include A Partition Method

A new feature that just arrived in Laravel 5.3 is a new Collection Partition method that allows you to separate results into two elements. $collection = collect([1, 2, 3, 4, 5, 6, 7]); $items = $collection->partition(function ($i) { return $i < 4; }); Now $items will be a collection containing two items. The first is … Continue reading Laravel Collections Now Include A Par... Read more…

Laravel 5.4 – Higher Order Messaging for Collections
Laravel 5.4 / November 07, 2016

Laravel 5.4 – Higher Order Messaging for Collections

Development for Laravel 5.4 is now underway and new features are being leaked out as they are merged in. One new feature announced is “higher order” messages for Collections that was contributed by @franzliedke

Read more…
LN 20: With special guest Adam Wathan
Podcast / June 28, 2016

LN 20: With special guest Adam Wathan

In this week’s Laravel News podcast we have Adam Wathan on to talk about his book Refactoring to Collections and a new package MailThief. You can listen from the podcast site, subscribe in iTunes or Google Play. Show Links: Refactoring with Collections Mailthief Full Stack Radio Super Secret Discount Code save 25% off Refactoring with Collections with the code: … Continue reading Read more…

A look at what’s coming to Laravel 5.3
News / June 02, 2016

A look at what’s coming to Laravel 5.3

Laravel 5.3 is now released and available for everyone. Here is a quick look at some of these new features: Laravel Scout Laravel Scout is a driver based full-text search for Eloquent. Out of the box, it supports Algolia and because it’s driver based anyone in the community can create their own integration with other … Continue reading A look at what’s co... Read more…

New Book: Refactoring to Collections
News / May 18, 2016

New Book: Refactoring to Collections

Adam Wathan launched a new book today, Refactoring to Collections, that teaches you how to apply functional programming principles to write clean, maintainable PHP. Learn how to use collection pipelines to break down ugly, complex functions into a series of simple transformations, free of loops, complex conditionals, and temporary variables. I’ve seen some of the … Continue reading Read more…