Browse Source

Make Artisan service provider be deferred.

Taylor Otwell 10 years ago
parent
commit
7c8b8e7dba
1 changed files with 17 additions and 0 deletions
  1. 17 0
      app/Providers/ArtisanServiceProvider.php

+ 17 - 0
app/Providers/ArtisanServiceProvider.php

@@ -5,6 +5,13 @@ use Illuminate\Support\ServiceProvider;
 
 
 class ArtisanServiceProvider extends ServiceProvider {
 class ArtisanServiceProvider extends ServiceProvider {
 
 
+	/**
+	 * Indicates if loading of the provider is deferred.
+	 *
+	 * @var bool
+	 */
+	protected $defer = true;
+
 	/**
 	/**
 	 * Register the service provider.
 	 * Register the service provider.
 	 *
 	 *
@@ -15,4 +22,14 @@ class ArtisanServiceProvider extends ServiceProvider {
 		$this->commands('App\Console\InspireCommand');
 		$this->commands('App\Console\InspireCommand');
 	}
 	}
 
 
+	/**
+	 * Get the services provided by the provider.
+	 *
+	 * @return array
+	 */
+	public function provides()
+	{
+		return ['App\Console\InspireCommand'];
+	}
+
 }
 }