Showing 10 of 1,204 results.

Notes on Decimals | Laravel String Pluralization

…explicit number groups must be replaced with intervals (to have the example make sense contextually, it will use USD currency instead): 1 <?php 2 3 $ message = ' |{0} You have no money. 4 |]0,1[ You have a few cents. 5 |[1,3[ You have a dollar,...

Laravel MessageBag Public API: setFormat

setFormat($format = ':message') The setFormat is the logical opposite of the getFormat method. It allows developers to customize the format used by all methods of the MessageBag instance. It defines a $format parameter, whose argument will be used...

Laravel Collection Public API: whereLoose

…string 'cucumber' (length=8) 13 'age' => int 2 It can be observed that the two age values have different data types, but were still returned in the $results collection. The whereLoose method is a shortcut to calling the where method with...

Laravel ViewErrorBag Public API: getBag

…ss a property, where the property name is the intended key. This technique exhibits the same behavior as using the getBag method. 1 <?php 2 3 // Get the 'formErrors' MessageBag instance. 4 $ formErrors = $ viewErrorBag -> formErrors ;This article...

Specifying a Locale | Laravel 5: String Translation Public API

By default, the get method will look for the translation lines using the locale specified as the default with the translation service. However, we can specify a locale by supplying an argument for the $locale parameter. For the following example,...

Filter Search