title: Class not found after adding Service Provider class
body: <p>I'm trying to extend the Validator class. So that my text field doesn't return false when space is added.</p>
  
  <p>I'm create a folder like app\extension\validation</p>
  
  <p>Here's my CustomValidation class</p>
  
  <pre><code>&lt;?php namespace App\Extension\Validation;
  
   use Illuminate\Validation\Validator;
  
   class CustomValidation extends Validator{
  
     public function alpha_spaces($attribute, $value, $parameters)
     {
      if(preg_match("/^([-a-z0-9_ ])+$/i", $value))
      {
          return true;
      }
      return false;
     }
   }
  </code></pre>
  
  <p>Here's the ValidationServiceProvider class in the same folder</p>
  
  <pre><code>&lt;?php namespace App\Extension\Validation;
  
  use Illuminate\Support\ServiceProvider;
  
  class ValidationServiceProvider extends ServiceProvider{
  
      public function register(){}
  
      public function boot()
      {
          $this-&gt;app-&gt;validator-&gt;resolver(function($translator, $data, $rules, $messages)
          {
              return new CustomValidation($translator, $data, $rules, $messages);
          });
      }
  }
  </code></pre>
  
  <p>And here is the error that I'm getting when I try to add the service provider to app.php</p>
  
  <pre><code>Class 'App\Extension\Validation\ValidationServiceProvider' not found
  </code></pre>
  
  <p>I have the class in app\Extension\Validation as ValidationServiceProvider.php</p>
  
  <p>Does anyone have any idea why I'm having this problem. I've been stuck on this all day and I need help from someone please.</p>