File: D:/HostingSpaces/SBogers85/equichecker.com/app/KommaApp/Kms/KmsServiceProvider.php
<?php namespace KommaApp\Kms;
use Illuminate\Support\ServiceProvider;
class KmsServiceProvider 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->bootViewComposers();
$this->bootValidators();
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->singleton('KommaApp\Kms\Core\Kms', function ($app, $slug) {
return $app->make('KommaApp\Kms\Core\KmsSingleton');
});
$this->app->singleton('KommaApp\Products\Kms\ProductRepository', function ($app, $slug) {
return $app->make('KommaApp\Products\Kms\ProductRepositorySingleton');
});
}
protected function bootViewComposers()
{
$this->app->view->composer('kms/partials.sidebar', 'KommaApp\Kms\Composers\KmsSidebarMenuComposer');
$this->app->view->composer('kms/partials.flashmessages', 'KommaApp\Kms\Composers\KmsFlashMessagesComposer');
}
protected function bootValidators()
{
\Validator::extend('csv', 'KommaApp\Kms\Core\Validators\CsvValidator@validate');
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return array();
}
}