title: Implement adapter design pattern in laravel application
body: <p>I tried to implement adapter design pattern in my laravel application.
  I had to use more than cloud to upload images ex.(google cloud storage, amazon s3).</p>
  
  <p>1- I created an interface called ImageUploderInterface.</p>
  
  <p>2- I created to classes AmazonCloudFrontService class and GoogleCloudStorageService each one of them implement ImageUploderInterface.  </p>
  
  <p>3- I created service provider to register my interface and return specific object from one class (AmazonCloudFrontService  OR GoogleCloudStorageService) depend on env varaible.  </p>
  
  <p>4- I registered my service provider in config/app.php.</p>
  
  <p>5- then I try to inject the ImageUploderInterface in my controller But I had an error that the interface doesn't exit.</p>
  
  <p><strong>image upload interface</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Interfaces;
  
  interface ImageUploderInterface
  {   
     public function uploadImage($file, $uploadFolder);
  
     public function retrieveImage($fileName, $uploadFolder);
  }
  </code></pre>
  
  <p><strong>service provider</strong></p>
  
  <pre><code>&lt;?php
  
   namespace App\Providers;
  
   use Illuminate\Support\ServiceProvider;
   use App\Interfaces\ImageUploderInterface;
   use App\Services\AmazonCloudFrontService;
   use App\Services\GoogleCloudStorageService;
  
  class ImageUploadServiceProvider extends ServiceProvider
  {
  /**
   * Register services.
   *
   * @return void
   */
  public function register()
  {
      $this-&gt;app-&gt;singleton(ImageUploderInterface::class, function ($app)         {
          switch ($app-&gt;make('config')-&gt;get('services.image-uploader')) {
              case 'amazon':
                  return new AmazonCloudFrontService;
              case 'gcs':
                  return new GoogleCloudStorageService;
              default:
                  throw new \RuntimeException("Unknown upload image Service");
          }
      });
  }
  }
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p>message: "Class App\Interfaces\ImageUploadInterface does not exist", exception: "ReflectionException",…}
    exception: "ReflectionException"
    file: "/var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php"
    line: 826
    message: "Class App\Interfaces\ImageUploadInterface does not exist"</p>
  </blockquote>