Showing 10 of 2,145 results.

Laravel 5 Collections: Retrieving Collection Elements With all

The all method can be used to retrieve the underlying array that the collection is using to hold its data.The signature of the all method is: 1 public function all ( ) ;The following code demonstrates the usage of the all method: 1 use Illuminate...

sortBy Options | Laravel Collection Public API: sortBy

The $options parameter allows developers to change the sorting behavior of the sortBy method. The accepted options are the same options that are defined for PHP's sort function. The following collection instance will be used throughout this...

Scheduling Callbacks | Laravel Task Scheduler: An Introduction

It is possible to schedule a function to execute at a given interval using the schedule's call method: 1 <?php 2 3 // ... 4 5 protected function schedule ( Schedule $ schedule ) 6 { 7 $ schedule -> call ( function ( ) { 8 // Some task to execute...