Showing 10 of 2,142 results.

Collapsing Laravel Collections using array_collapse

This article is a continuation of the Laravel Array Helper Function: array_collapse article. The collapse (defined in the Illuminate\Support\Arr helper class) method will also work on Illuminate collections. There is no special syntax required to...

Laravel 5 Message Bags: Merging Additional Messages With merge

The merge method is used to combine, or merge , the contents of the MessageBag instance with the provided $messages . The $messages can be any valid array or an object instance that implements the "Illuminate\Contracts\Support\MessageProvider"...

Laravel String Helper Function: parse_callback

…somewhat specialized purpose. The following syntax for class names and method names can be found utilized throughout the Laravel framework: 1 ClassName @ someMethodName The point is that there is a string, split by the @ symbol, with the class...

Configuring Image Sizes | Configuration Overview

Image sizes, and their associated metadata, are configured within the images.php configuration file. Each configured social media image must have the following properties: handle, : A unique handle to internally represent the social media...

toJson($options = 0) | Laravel Fluent Part Two: The Public API

The toJson method will return a JSON encoded version of the data stored within the fluent instance. It internally does this by returning a call to PHP's json_encode function, passing in any $options that were supplied. Like the json_encode...

Creating a Content Reaction System with Statamic 3 and Antlers

Throughout this article we will explore creating a system that will allow site visitors to leave "reactions" on Statamic 3 entries. Once complete, users will be able to add the following reactions to entries: 👍 Like, 😍 Love, 😯 Surprised, 🤔...

make($value, array $options = []) | Laravel's Bcrypt Hasher

The make method is used to hash a given $value with the provided $options . At the time of writing, the rounds value is the only option that is checked for in the $options array. See the information on the setRounds method for more information on...