Search

Showing 7 of 587 result(s)

/blog/2016/03/23/calculating-averages-using-collections-in-laravel

The avg method is a useful method for calculating the average of all items in the collection. The avg method defines an optional $key parameter, which can be used to specify what property of the collection should be averaged. If no key is...

/blog/2016/11/16/laravel-string-helper-function-finish

The finish helper method will make sure that a given $value always ends with exactly one occurrence of the $cap . This helper method is incredibly useful when construction URIs or file paths. The $cap can be any string of characters, and does not...

/blog/2016/11/18/laravel-array-helper-functions

Laravel provides many helper functions for interacting and manipulating array data structures. Laravel's array functions offer additional functionality on top of PHP's built in array functions. The helper functions in this section are located...

/blog/2016/11/19/laravel-array-helper-function-array_set

set(&$array, $key, $value) The set helper method is the logical opposite of the forget (discussed in the Laravel Array Helper Function: array_forget article) method. its purpose is to set values within an array. The set method also uses dot...

/blog/2016/11/20/laravel-application-helper-function-abort

abort($code, $message = '', array $headers = []) The abort function will throw an instance of Symfony\Component\HttpKernel\Exception\HttpException with the given $code , $message and any $headers supplied. These exceptions can be caught and...

/blog/2016/11/21/laravel-facades-part-three-creating-custom-facades

This article is part of a four part series all about Laravel facades. Each of the parts are listed below: Laravel Facades Part One: An Introduction to Facades, Laravel Facades Part Two: Using Facades, ., Laravel Facades Part Three: Creating Custom...

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

avg($key = null) The avg method is a useful method for calculating the average of all items in the collection. The avg method defines an optional $key parameter, which can be used to specify what property of the collection should be averaged. If...