Example Use | Laravel 5: Managing HTTP Cookies With cookie
The following examples will demonstrate the various ways to invoke the cookie helper function.
Showing 10 of 1,090 results.
The following examples will demonstrate the various ways to invoke the cookie helper function.
The Illuminate\Translation\Translator class is the class that most Laravel developers will become the most familiar with when interacting with the Laravel translation services. The Translator class is responsible for handling the interactions...
…plied a falsey value for the $fallback parameter; after the code has executed, the $line variable would contain the value validation.array . If toggling this behavior is something you would like to do often, it is important to note that the trans...
…les. It accepts many of the same parameters, but does not allow us to specify a fallback locale (if a translation line cannot be found in the JSON-based language files, Laravel will start to look in the standard PHP-based translation files for...
…) ; After the code in the previous example has been executed, the $exists variable would contain the value false . Since this is a common thing to do, Laravel provides an additional method to help make the intent of the method call clearer to...
…for a given locale. its default behavior is to look in the default locale for the requested translation $key , but we can request information about any locale by supplying a string argument for the $locale parameter. The hasForLocale method is a...
In the following example, we will check if various translation lines have been defined for different locales. The results of the operation will appear above the method call as either true or false . The following examples will assume the following...
…age_plural_rules.html gives a sense of the differences between different locales and the rules of pluralization. While words in the English language, by comparison, are fairly simple to convert to their plural forms (see Str::plural in the String...
…ho $ item ; 23 } ) ; The each method does not explicitly allow the modification of a collection's items, and simply returns a reference to the original collection. However, of the way PHP treats objects as references, it is possible to modify the...
…m ; 21 } ) ; The each method does not explicitly allow the modification of a collection's items, and simply returns a reference to the original collection. However, because of the way PHP treats objects as references, it is possible to modify the...