Showing 10 of 1,322 results.

An Introduction to Laravel's Collection Public API

…ic methods. The Collection API exposes methods for retrieving values from a collection, transforming the underlying array, pagination and simple aggregate functions, amongst others. This section will cover most of the methods in the public API,...

Form Attributes | Meerkat Forms

With Meerkat, it is simple to add additional form attributes to your Meerkat forms. The following example demonstrates how to add a custom HTML data attribute and a CSS class: 1 {{ meerkat : create class = " w-full " data-attribute = " my-value "...

Magpie | The Statamic Add-on Roundup

Magpie allows me to create backups of the site incredibly easily. It is a command line utility, which means I can easily schedule its execution. There is a lot to this add-on, like configurable off-site storage locations; the details can be found...

Comparing Just the Key | Laravel Array Helper Function: array_where

…that are currently suspended: 1 <?php 2 3 $ suspendedStudents = [ 4 ' Dennis ' , 5 ' Tonya ' 6 ] ; Now we want to get only the test scores of those students who are not currently suspended (students who are suspended to not get their test scores...

Laravel Collection Public API: flip

flip The flip method will return a new Collection instance where are the all the collection item's keys have been exchanged with their corresponding values. The following code example demonstrates the effects of the flip method: 1 <?php 2 3 use...

hasComponents | The Document Parser

Returns a value indicating if any Laravel tag components were parsed. 1 <?php 2 3 public function hasComponents ( ) : bool ;