public static function instance(string $key)
    {
        $collection = static::make();

        $class = $collection->get($key);

        if (class_exists($class)) {
            return resolve($class);
        }

        return null;
    }
public static function instance(string $key)
    {
        $collection = static::make();

        $class = $collection->get($key);

        if (class_exists($class)) {
            return resolve($class);
        }

        return null;
    }
public static function instance ( string $ key ) { $ collection = static :: make ( ) ; $ class = $ collection -> get ( $ key ) ; if ( class_exists ( $ class ) ) { return resolve ( $ class ) ; } return null ; }
Create an instance of a collection item

@param string $key
@return mixed
Create an instance of a collection item