Showing 10 of 2,055 results.

Translation Namespaces | Laravel Localization: The File Loader

…use of this, both function calls in the following example will return the same result: 1 <?php 2 3 // The following function calls are assuming the 'en' locale, using 4 // the default Laravel translation groups. 5 6 // Retrieving a language value...

Laravel Collection Public API: intersect

intersect($items) The intersect removes any values that are not in the provided $items array. The intersect method returns a new instance of Collection . The intersect method preserves any keys from the original collection. The following code...

Laravel Collection Public API: sortByDesc

sortByDesc($callback, $options = SORT_REGULAR) The sortByDesc method operates exactly the same as the sortBy method. The only differences is that the sortByDesc method does not define a $descending parameter. The sortByDesc method internally makes...

Skippable/Ignorable Properties | Introduction & Installation

By default, Attribute Renderer will emit empty strings if a value returns null : 1 <?php 2 3 use function Stillat \ StatamicAttributeRenderer \ attributes ; 4 5 attributes ( [ 6 ' name ' => ' author ' , 7 ' content ' => ' $name ' 8 ] ) ; produces:...

Laravel Artisan Generator Command: The make:command Command

…al command name of the ConsoleMakeCommand class). In Laravel 5.3, the make:console command was renamed to make:command . This section is relevant for Laravel 5 versions 5.2 and below with the command make:console . The following example...

That Escalated Quickly: All the New Things

…so have a sample site to go along with it, as well as make some of the content simpler to write, since I could target a known site. I started working on that sample site to go along with the article. After tinkering on the sample site for a while...

Laravel String Helper Function: str_plural

The plural helper method will attempt to return a plural version of the given $value . It does this through a series of specialized internal functions, that will not be covered in great detail here. This helper method will apply general rules to...