for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanedev\GeoLocation\Google\Directions\Entities;
use Illuminate\Support\Collection;
/**
* Class LegCollection
*
* @package Arcanedev\GeoLocation\Google\Directions\Entities
* @author ARCANEDEV <[email protected]>
*/
class LegCollection extends Collection
{
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
* Load the legs data.
* @param array $legs
* @return self
public static function load(array $legs)
$collect = new static;
foreach ($legs as $leg) {
$collect->push(new Leg($leg));
}
return $collect;