Showing 10 of 1,278 results.

Intervals | Laravel String Pluralization

Specifying every number required for a given translation message can be tedious, or even impossible. However, intervals can be specified to make working with large groups of numbers easier. The syntax for intervals comes directly from the ISO...

Notes on Decimals | Laravel String Pluralization

In the previous example, trying to match the number 3.4 will throw an instance of InvalidArgumentException . To match any possible number, including decimals, for the previous translation messages, the explicit number groups must be replaced with...

Example Use | Laravel 5: Sorting Arrays With sort

Let's refactor our students example from the where section to use a class based structure. First, we will create a new StudentTestResult class: 1 class StudentTestResult { 2 3 public $ name = ' ' ; 4 5 public $ testScore = ' ' ; 6 7 public...

Array Sort Considerations | Laravel 5: Sorting Arrays With sort

The array_sort function internally creates a new instance of the \Illuminate\Support\Collection class with the given $array and then calls the collection's sortBy(callable $callback = null) method with the given $callback . It then converts the...

Filter Search