Hello, and thanks in advance for your help.
I want to use this curl package: https://packagist.org/packages/jyggen/curl
I've added it to my composer.json file
"require": {
"laravel/framework": "4.1.*",
"jyggen/curl": "4.0.*@dev"
},
I've run composer update and it pulled the files into /vendor/jyggen
I've run composer dump-autoload and it added some lines to /vendor/composer/autoload_psr4.php
return array(
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
'Jyggen\\Curl\\Tests\\' => array($vendorDir . '/jyggen/curl/tests'),
'Jyggen\\Curl\\' => array($vendorDir . '/jyggen/curl/src'),
);
Here is my controller
<?php
require 'vendor/autoload.php';
use Jyggen\Curl;
class PlayController extends BaseController {
public function index()
{
// Single URL
var_dump(Curl::get('http://example.com/'));
}
}
I get this error shown in the log
2014-05-21 10:37:03] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Jyggen\Curl' not found'
I'd value your assistance.
Thanks
Pete
@AndreasLutro solved this for me in the IRC. Turns out that the example on the vendors docs was wrong and I needed
use Jyggen\Curl\Curl;
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community