Search

Showing 7 of 1,216 result(s)

/blog/2017/12/06/laravel-5-string-helpers-getting-the-singular-form-of-a-string-value#content-example-use

Any words, or word endings, in the following table will not be affected by the singular method. This is either because the resulting word is already singular, or because there is no inflection available. Word endings are denoted by the prefix * :...

/blog/2017/12/06/laravel-5-string-helpers-getting-the-singular-form-of-a-string-value#content-global-strsingular-helper-function

The str_singular function is a shortcut to calling Str::singular . This function is declared in the global namespace.

/blog/2017/12/06/laravel-5-string-helpers-pluralization-and-strings#content-example-use

The method takes the $value that should be pluralized, and the $count of the items. If the $count is equal to 1 , the original $value is returned. Assuming the following messages array: We could display the number of messages to the user like so:...

/blog/2017/12/06/laravel-5-string-helpers-pluralization-and-strings#content-plural-special-cases

Any words, or word endings, in the following table will not be affected by the plural method. This is either because the resulting word is already plural, or because there is no inflection available. Word endings are denoted by the prefix * : The...

/blog/2017/12/06/laravel-5-string-helpers-pluralization-and-strings#content-global-strplural-helper-function

The str_plural function is a shortcut to calling Str::plural . This function is declared in the global namespace.