src/Collection.php
public function value($key, $default = null)
    {
        $value = $this->get($key);

        if (!$value) {
            return $this->valueExecutor($default, $value, $key);
        }

        return $value;
    }
public function value($key, $default = null)
    {
        $value = $this->get($key);

        if (!$value) {
            return $this->valueExecutor($default, $value, $key);
        }

        return $value;
    }
public function value ( $ key , $ default = null ) { $ value = $ this -> get ( $ key ) ; if ( ! $ value ) { return $ this -> valueExecutor ( $ default , $ value , $ key ) ; } return $ value ; }
Returns the value for the specified key or if there is no value, returns the default

Default can be a callable (closure) that will be executed. This method differs to
{@link static::get()} in that the default will be returned even when the key exists and
has no "truthy" value (null, false, empty string etc). Default can be a callable; this will
be passed the value (if any) and the key as arguments.

@param string         $key
@param mixed|callable $default

@return mixed
Returns the value for the specified key or if there is no value returns the default