HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/umans.komma.pro/workbench/komma/kms/src/Komma/Kms/KmsServiceProvider.php
<?php namespace Komma\Kms;

use Illuminate\Support\ServiceProvider;
use Komma\Kms\Shops\Shop;
use Komma\Kms\Shops\ShopsRepository;

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->package('komma/kms','kms');
		require_once __DIR__ . '/../../filters.php';
		require_once __DIR__ . '/../../routes.php';
		require_once __DIR__ . '/../../helpers.php';

        $this->bootViewComposers();
        $this->bootValidators();
	}

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
		$this->app->bind('kms.shop', function($app, $slug)
		{
			return $app['kms.shop.repository']->findBySlug($slug);
		});

		$this->app->bind('kms.shop.repository', function($app)
		{
			return (new ShopsRepository(new Shop));
		});


	}

	protected function bootViewComposers()
	{
		$this->app->view->composer('kms::partials.sidebar', 'Komma\Kms\Composers\KmsSidebarMenuComposer');
        $this->app->view->composer('kms::partials.flashmessages', 'Komma\Kms\Composers\KmsFlashMessagesComposer');

        //$this->app->view->composer('kms::attributeCustomViews.orderOverview', 'Komma\Kms\Orders\AttributeComposers\OrderOverviewComposer');
	}

    protected function bootValidators()
    {
        \Validator::extend('csv', 'Komma\Kms\Core\Validators\Validator@csv');
        \Validator::extend('required_if_not_empty', 'Komma\Kms\Core\Validators\Validator@requiredIfNotEmpty');
    }

	/**
	 * Get the services provided by the provider.
	 *
	 * @return array
	 */
	public function provides()
	{
		return array();
	}

}