title: Making ServiceProvider Laravel
body: <p>I recently watched a video from jeffery way on the pusher real time system. I have everything working correctly. My question refers to a comment he made during the video. He had this code inside his route.php:</p>
  
  <pre><code>        App::bind('Pusher', function($app){
          $options = array(
              'cluster' =&gt; 'eu',
              'encrypted' =&gt; true
          );
          $keys = $app['config']-&gt;get('services.pusher');
          return new Pusher($keys['public'], $keys['secret'], $keys['app_id'], $options);
      });
  </code></pre>
  
  <p>He comments that this could should be moved from the routes.php to a service provider but doesn't go any further into detail. Ive been looking up service providers but not quite understanding yet. How do i move this a to service provider correctly?</p>
  
  <p><a href="https://github.com/laracasts/Pusher-Lesson/blob/master/app/routes.php" rel="nofollow">https://github.com/laracasts/Pusher-Lesson/blob/master/app/routes.php</a></p>