开发package,引入guzzlehttp,报错:guzzlehttp\http not found

在开发 Laravel package时,引入了GuzzleHttp,但是再 new client 时报错:

>>> app('ipconversion')
=> VavoCake\IpConversion\IpConversion {#2824}
>>> app('ipconversion')->convert('183.160.92.159')
PHP Error:  Class 'VavoCake/IpConversion/GuzzleHttp/Client' not found in /home/vagrant/Code/packagetest/packages/vavocake/ipconversion/src/Traits/HttpRequestTrait.php on line 20

引用代码:

<?php

namespace VavoCake\IpConversion\Traits;

use GuzzleHttp\Client;

class HttpRequestTrait
{
    public function get($ip)
    {
        $client = $this->getHttpClient([
            'base_uri' => config('ipconversion.url')
        ]);
        $response = $client->request('GET', $this->makeParams($ip));
        return $response;
    }

    protected function getHttpClient(array $options)
    {
        return new Client($options);
    }
JellyBool
修改的评论也不能少于六个字哦!
shing110
修改的评论也不能少于六个字哦!
714671404
修改的评论也不能少于六个字哦!