Showing 7 of 1,975 result(s)
The env helper function is used to retrieve the value of an environment variable. You may supply a $default value to be returned if there is no value currently set for the provided $key .The signature of the env function is:The following examples...
The macro method is used to add a callback function macro to any class that utilize the "Illuminate\Support\Traits\Macroable" trait.The signature of the macro method is:The following example demonstrates how to add a new method chunk to the...
The SORT_LOCALE_STRING treats each item as a string, while also taking into account the current locale, when doing the comparison. The following code example shows how to use the SORT_LOCALE_STRING flag when sorting the $collection created...
In the section on the reject method we created a Product class to hold information about a product, and whether or not the product is on sale. Let's expand the Product class to implement the "Illuminate\Contracts\Arrayable" interface:...
The setBarWidth method is used to set the width of the progress bar. The width be used to set the width of the actual progress bar itself (using the %bar% placeholder) and not any other information supplied by other placeholders. The supplied...
At the moment, when a user has registered they are redirect back to the registration page with a success message. Likewise, when a user logs in, they are redirected to the site's home page. Both of these are fine, but we will update our site so...
This documentation page is intended for those looking to implement their own Blade validators, or are curious to learn more about the system. If you are interested in running existing validators against your Laravel project, consider reading the...