Showing 10 of 1,090 results.

Creating a Hybrid Cache System for Statamic: Part Four

…authors can specify an expiration time on an events listing page using the Antlers tag we'll develop later. They can do this without crafting custom logic to decide which event time on the page should dictate the cache's expiration date. With our...

Laravel Companion: Second Edition

Laravel Companion: Second Edition is the practical, example-rich reference guide designed for developers who want to work smarter with Laravel. Whether you're just getting started or looking to level up, this book gives you a fast and accessible...

Calculating Averages Using Collections in Laravel

The avg method is a useful method for calculating the average of all items in the collection. The avg method defines an optional $key parameter, which can be used to specify what property of the collection should be averaged. If no key is...

Laravel Collection Public API: forPage

forPage($page, $perPage) The forPage method is used to implement pagination over collections. The forPage defines two parameters: $page , which is used to tell the collection which "page" should be returned and $perPage , which is used to control...

Filter Search