Showing 10 of 2,044 results.

Handling Specific Numbers | Laravel 5: String Pluralization Syntax

Sometimes it is useful to associate a given message number with exactly one number. In previous examples, we've seen how to handle the pluralization case where the number of items is exactly 0 , however, we can expand this idea to any arbitrary...

Collection Scoping | Responses and Replies

Comment scoping works in exactly the same was as scoping in Statamic collections; and you can find out more information about how Statamic scoping works by reading the Statamic documentation on scoping . The default scope is named comments , and...

Laravel String Helper Function: ends_with

…used to check if a given $haystack ends with any of the supplied $needles . The $haystack is any value that can be cast into a string, and $needles is any value that can be cast into an array. If the $haystack ends with any of the $needles , the...

locale() | The Laravel Translator

The locale() method is functionally identical to the getLocale() method. It internally returns the value of the getLocale() method. 1 <?php 2 3 // Get a `Translator` instance from the application container. 4 $ translator = app ( ' translator ' )...

Laravel String Helper Function: camel

Camel casing is similar to studly case such that each word starts with a capitalized letter, with the difference being the first character is lower cased. Like the studly method, the camel method will not affect the casing of the rest of the word....