Search

Showing 7 of 1,975 result(s)

/blog/2016/11/30/laravel-collection-public-api-sort

sort(callable $callback = null) The sort method is used to sort the collection. If no $callback is provided, the collection will be sorted using a case-insensitive "natural order" algorithm. An optional $callback can be supplied to customize the...

/blog/2018/04/22/laravel-5-collections-converting-a-multi-dimensional-collection-into-a-single-dimension-with-collapse

The collapse method combines all the first-level items of a collection into a new, single collection. The returned value of the collapse method is an instance of the Collection class.public function collapse();We will create a simple collection to...

/blog/2021/02/15/implementing-a-customer-dsl-parser-in-php#content-improving-the-string-implementation

At the moment we've constructed a simple parser for our filter input language, and works relatively well. However, there are a few improvements we need to make regarding the string implementation. To get started, let's update the value of our...

/blog/2021/02/20/integrating-laravel-spark-and-statamic-3#content-creating-user-registration-and-login-pages

…are incredibly opinionated, and not intended to be final products, and only serve to get something on the page so we can continue. Locate the resources/views/register.antlers.html template and set the content to the following: Submitting the form...

/blog/2023/09/03/creating-a-hybrid-cache-system-for-statamic-part-six

…and two more Artisan commands. Our cache reporting will provide the total disk size of our cache, the number of cached responses, and some information about our cache namespaces and labels. We will use a dedicated App\HybridCache\CacheStats class...

/blog/2016/11/30/laravel-implementing-a-crypt_sha512-hasher

In this article we will create an implementation of Illuminate\Contracts\Hashing\Hasher using PHP's crypt function and the CRYPT_SHA512 hashing function. Like in the previous sections, we will examine each method before looking at the full...

/blog/2016/12/07/laravel-artisan-interacting-with-commands#content-executing-a-command

…execute an Artisan command we first need to invoke the artisan console application. The console application is typically located in the root directory of the Laravel application and is named artisan . Some shells support invoking the application...