Showing 10 of 1,090 results.

Laravel 5: Getting the Current Date and Time With now

The now helper function will return a new Carbon instance initialized to the current date and time. The now function accepts an optional timezone parameter to adjust the timezone of the returned date.The signature of the now function is: 1...

Method 2: Using Events | Guide: User-Only Comment Setup

…ond method to populate the authenticated_user value is by using events. This method can be useful if you do not want to rely on a hidden field value, which could be changed by the user before submitting. For simplicity, we will be using Meerkat's...

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...

The "thread" Filters

…d to exists in a list of provided identifiers. Thread identifiers are the ids of your Statamic pages, collection entries, etc. The thread filters are not universally supported by all Antlers tags. For example, the {{ meerkat:responses }} tag...

Laravel 5: Encrypting Strings With encrypt

The encrypt helper function can be used to encrypt a given string value. The function resolves the configured "Illuminate\Contracts\Encryption\Encrypter" implementation from the Service Container and then calls the encrypt method on the Encrypter...

Lambdas And Closures

…n looking thing: 1 <?php 2 3 Route :: get ( ' my/url ' , function ( ) 4 { 5 return ' This is my url! ' ; 6 } ) ; This is not something new, or something that we are not used to seeing. But what exactly is going on? Some intermediate to veteran...

Filter Search