Search

Showing 7 of 1,975 result(s)

/blog/2016/11/20/laravel-array-helper-function-array_prepend-easily-add-an-item-to-the-beginning-of-an-array

prepend($array, $value, $key = null) The prepend helper method is used to push a new $value onto the beginning of an existing $array . It defines one optional parameter: $key . If an argument is supplied for $key , the new item will be given that...

/blog/2018/02/20/laravel-5-string-translation-public-api#content-retrieving-translation-lines

The simplest way to use the get method is to simply ask it to get the value of a translation line. In the following example, we will retrieve the validation.accepted translation line (we will continue to reference the validation translation lines...

/blog/2018/04/11/laravel-5-retrieving-elements-from-an-array-with-get#content-example-use

Assuming the following array: We can quickly retrieve the value for key like so: Where the alternative syntax would be: While PHP's array access syntax may be a little shorter, using dot notation is easier to read. We can also specify a $default...

/blog/2018/04/14/laravel-5-accessing-the-cache-system-with-cache

…cache store, retrieve existing items from the cache, and to place new items in the cache. The behavior of the cache helper function is determined by the number and types of arguments supplied.The signature of the cache function is:The following...

/blog/2018/04/22/laravel-5-collections-transforming-collection-elements-with-map#content-signature

The following code example will transform the case of each string in the collection and return a new collection instance: The $newCollection variable will be an instance of the Collection class and contain a value similar to following output: The...

/blog/2021/11/07/using-modifiers-in-antlers-dynamic-bindings

Throughout this article we will be taking a closer look at passing variables to parameters and modifiers by using dynamic binding . Dynamic binding is a technique to supply a value to a tag or modifier by referencing it's variable name. For...

/meerkat/default-variables#content-permission-variables

Each comment author array ( author or internal_parent_author ) contains an array permissions containing all of the resolved permissions for the user. Anonymous authors will also have a permissions array, with all permissions set to false . The...