title: How to extend vendor package service provider in Laravel 5.5
body: <p>I am using a package that integrates Xero accounting.</p>
  
  <p>They have a file called <code>XeroServiceProvider.php</code> in the following location: <code>/vendor/drawmyattention/xerolaravel/Providers/XeroServiceProvider.php</code>.</p>
  
  <p>I need to extend this service provider in my application but I don't like the idea of editing this file directly. </p>
  
  <p>Is there a way I can extend this service provider easily without updating vendor files?</p>
  
  <p>Here is the file I need to extend:</p>
  
  <pre><code>namespace DrawMyAttention\XeroLaravel\Providers;
  
  use Illuminate\Contracts\Filesystem\Filesystem;
  use Illuminate\Support\ServiceProvider;
  use \App\Invoice;
  
  class XeroServiceProvider extends ServiceProvider
  {
      private $config = 'xero/config.php';
  
      public function boot()
      {
          $this-&gt;publishes([
              __DIR__.'/../config.php' =&gt; config_path($this-&gt;config),
          ]);
      }
  
      /**
       * Register the service provider.
       *
       * @return void
       */
      public function register()
      {
          $this-&gt;app-&gt;bind('XeroInvoice', function(){
             //return new \XeroPHP\Models\Accounting\Invoice();
             return new Invoice();
          });
  
      }
  }
  </code></pre>