A
A
Alexander2017-02-16 12:16:28
Composer
Alexander, 2017-02-16 12:16:28

How to include a library via composer in laravel?

Installed the library in the root of the project composer require google/apiclient:^2.0. Further, when I call a class from this library in the controller located at Laravel/app/Http/Controllers/YouTubeController.php , I $client = new Google_Client();get the error Class 'App\Http\Controllers\Google_Client' not found. How to fix it? How to call a library class?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mysterion, 2017-02-16
@Dredder

In app.php add provider:
And alias:
https://github.com/pulkitjalan/google-apiclient

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question