robbiepaul / cloudconvert-laravel

A Laravel wrapper for the CloudConvert API
177 stars 34 forks source link

Class 'App\Http\Controllers\CloudConvert' not found #41

Closed JonoHall closed 7 years ago

JonoHall commented 8 years ago

I found your instructions great, got it installed, but came up with this error.

It took me a day or so trying to figure it out before consulting the gurus on IRC. I'm quite new to Laravel, so it didn't occur to me that you need to add the class to your controller before you can use it (now it seems obvious).

For anyone else trying to solve this, you need to add the following to the top of your page: use RobbieP\CloudConvertLaravel\Facades\CloudConvert;

I'd recommend adding this into your readme just above the part you mention "Now you can use CloudConvert in your application!".

Thanks for your app!

reinierkors commented 7 years ago

Or you can add it to your app.php aliases: 'CloudConvert' => RobbieP\CloudConvertLaravel\Facades\CloudConvert::class,

and then just do: use CloudConvert;

robbiepaul commented 7 years ago

Thanks @reinierkors

The ServiceProvider should also automatically register the facade