Laravel - Collections - Method Min

The min method returns the minimum value of a given key:

    
    $min = collect([['foo' => 10], ['foo' => 20]])->min('foo');
    
    // 10
    
    $min = collect([1, 2, 3, 4, 5])->min();
    
    // 1