title: Use Google Drive Api in Laravel 5
body: <p>I'm a newbie in Laravel, and surely this question has an obvious answer, but I've not been able to connect Laravel 5 with Google Api.</p>
  
  <p>I have install the Api with composer like always, and it is in my vendor folder, but now I'm not sure how to use it.</p>
  
  <p>I've not found an answer to this (because this must be extremely simple).</p>
  
  <p>Probably I'm missing a namespace call, or something like this.</p>
  
  <p>On my IndexController, I have:</p>
  
  <pre><code>    &lt;?php 
  
  namespace App\Http\Controllers;
  
  class IndexController extends Controller {
  
      /**
       * Show the application welcome screen to the user.
       *
       * @return Response
       */
      public function index()
      {
        $client = new Google_Client();
        $client-&gt;setApplicationName("Client_Library_Examples");
        $client-&gt;setDeveloperKey("HERE_GOES_MY_KEY");
  
        $service = new Google_Service_Drive($client);
        $results = $service-&gt;volumes-&gt;listVolumes();
  
        foreach ($results as $item) {
          echo $item['volumeInfo']['title'], "&lt;br /&gt; \n";
        }
      }
  
  }
  </code></pre>
  
  <p>And the error I get is:</p>
  
  <blockquote>
    <p>Class 'App\Http\Controllers\Google_Client' not found</p>
  </blockquote>
  
  <p>I thought that it could be a problem with autoload_classmap, but there are all GoogleApi classes defined, like:</p>
  
  <p>(...)</p>
  
  <blockquote>
    <p>'Google_Client' => $vendorDir . '/google/apiclient/src/Google/Client.php', </p>
  </blockquote>
  
  <p>(...)</p>
  
  <blockquote>
    <p>'Google_Service_Drive' => $vendorDir . '/google/apiclient/src/Google/Service/Drive.php',</p>
  </blockquote>
  
  <p>Thanks for your patience and your help!</p>