title: Grouping event registrations on a service provider
body: <p>I want to define a service provider that registers events. So have done the following (taken from a book)</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  namespace MyApp\Providers;
  use Illuminate\Support\ServiceProvider;
  
  class EventsProvider extends ServiceProvider 
  {
  
       public function boot()
       {
           Event::listen('some.event', function($parameter)
           {
               // Handle the event..
           });
       }
  }
  </code></pre>
  
  <p>Then I added it to the provider array.</p>
  
  <p>But when I execute the code I get the following error</p>
  
  <blockquote>
    <p>implement the remaining methods
    (Illuminate\Support\ServiceProvider::register)</p>
  </blockquote>
  
  <p>It compels me to declare a <code>register()</code> method.</p>
  
  <p>When I add to the <code>EventsProvider</code> class a method named <code>register()</code> (without implementation, and just make it return null) I get the following error</p>
  
  <blockquote>
    <p>Class 'MyApp/Providers/EventProvider' not found</p>
  </blockquote>
  
  <p>Why is that, and how can I solve it?</p>