Created
June 22, 2013 17:01
-
-
Save zmax/5841589 to your computer and use it in GitHub Desktop.
sublime laravel service provider template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
namespace ${1:vendor}\\${2:package} | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Support\Facades\App; | |
class ${2:package}ServiceProvider extends ServiceProvider { | |
/** | |
* Indicates if loading of the provider is deferred. | |
* | |
* @var bool | |
*/ | |
protected \$defer = false; | |
/** | |
* Bootstrap the application events. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
// This method allows Laravel to know how to properly load the views, configuration, and other resources for your application. | |
// In general, there should be no need for you to change this line of code, as it will setup the package using the workbench conventions. | |
\$this->package('${3:vendor/package}'); | |
// include custom routes | |
// include __DIR__.'/../../routes.php'; | |
} | |
/** | |
* Register the service provider. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
/* Custom Command | |
\$this->app['package.commands.key'] = \$this->app->share( function(\$app) { | |
return new TestingCreatorCommand; | |
}); | |
\$this->commands('package.commands.key'); | |
*/ | |
/* Singleton Class | |
App::singleton('package.key', function() | |
{ | |
return; | |
}); | |
*/ | |
/* | |
\$this->app['package.key'] = \$this->app->share( function(\$app) { | |
return; | |
}); | |
*/ | |
} | |
/** | |
* Get the services provided by the provider. | |
* | |
* @return array | |
*/ | |
public function provides() | |
{ | |
return array(); | |
} | |
} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>llsp</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.php, source.php.embedded.block.html</scope> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment