turkalicious
4 years ago
158
13
Lumen

Add Guzzle to Lumen

Posted 4 years ago by turkalicious

I am trying to get guzzle work with lumen. I added guzzle through composer. composer.json

        "psr-4": {
            "App\\": "app/",
            "GuzzleHttp\\": "/vendor/guzzlehttp/"
        }
    },

and my controller

<?php namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use GuzzleHttp\Client;
 
class ApiController extends Controller {

when I try to instantiate a new guzzle, it fails. Though I am an old member of this site, I just started doing Laravel so I am not sure what to do.... obviously

Please sign in or create an account to participate in this conversation.