Laravel 5 - Fatal error: Class not found Vendor Feedly Package

169 Views Asked by At

I am using Laravel 5.2, with composer this package (https://github.com/kbariotis/feedly-api) have installed.

but that not work :(

app/Http/Controllers/TestController.php

$feedly = new Feedly(new feedly\Mode\SandBoxMode(), new feedly\AccessTokenStorage\AccessTokenSessionStorage());

saying the class was not found.

Fatal error: Class 'App\Http\Controllers\feedly\Feedly' not found

there is my package this path:/vendor/kbariotis/feedly-api/src/feedly/Feedly.php

/vendor/kbariotis/feedly-api/src/feedly/Feedly.php

1

There are 1 best solutions below

4
num8er On BEST ANSWER

Please add to top of file, before defining class of controller:

use \feedly\Feedly;
use \feedly\Mode\SandBoxMode AS FeedlyMode;
use \feedly\AccessTokenStorage\AccessTokenSessionStorage AS FeedlyAccessTokenStorage;

Then use it like:

$feedly = new Feedly(new FeedlyMode(), new FeedlyAccessTokenStorage());

Other howtos are in example