Search

Showing 7 of 1,216 result(s)

/blog/2018/02/19/laravel-55-translating-strings-with-the-trans-helper-function

The trans method is similar to the get method, and can be used in a similar way. The difference between the two methods is that the trans method does not allow you to change the fallback locale behavior, and defaults to always using the fallback...

/blog/2018/02/19/laravel-55-translating-strings-with-the-trans_choice-helper-function

The trans_choice helper function can be used to translate a line of text that is dependent on a number of items in a collection. For example, if you were developing an application to retrieve messages from an IMAP inbox, you might want the ability...

/blog/2018/04/11/laravel-5-adding-a-new-element-to-the-beginning-of-an-array-with-prepend

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 key. Supply a value for $key if you...

/blog/2018/04/11/laravel-5-adding-elements-to-the-array-with-add

The add helper method adds the given $key and $value to an $array if the $key doesn't already exist within the given $array .

/blog/2018/04/11/laravel-5-adding-or-setting-new-array-element-values-with-set

The set helper method is the logical opposite of the forget method. its purpose is to set values within an array. Mutable Function This function affects the original $array .

/blog/2018/04/11/laravel-5-checking-if-an-array-contains-an-element-with-has

The has helper method will return a boolean value that indicates if the given $key exists in the supplied $array , using dot notation. This method is incredibly useful when checking if an array has a specific key at an arbitrary depth.

/blog/2018/04/11/laravel-5-checking-if-an-array-is-an-associative-array-with-isassoc

The isAssoc helper method can be used to determine if a given $array is an associative array or not. The provided documentation for the isAssoc method states that an array is associative if it does not have sequential numeric keys beginning with...