App\Http\Controllers\NytController::__construct PHP Method

__construct() public method

Initialize the Controller with necessary arguments
public __construct ( )
    public function __construct()
    {
        $this->baseUrl = self::API_URL;
        $this->client = new Client(['base_uri' => $this->baseUrl]);
        $this->setGetResponse($this->getRelativeUrl());
    }