andriiosmak/laravel-layer-sdk

View on GitHub
src/LayerProvider.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Aosmak\Laravel\Layer\Sdk;

use Illuminate\Support\ServiceProvider;

/**
 * Class LayerProvider
 * @package namespace Aosmak\Laravel\Layer\Sdk
 */
class LayerProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        $this->publishes([
            __DIR__ . '/../config/layer.php' => $this->app->make('path.config') . '/layer.php'
        ], 'config');

        $this->app->bind('Aosmak\Laravel\Layer\Sdk\Services\LayerServiceInterface', function ($app) {
            $service = $app->make('Aosmak\Laravel\Layer\Sdk\Services\LayerService');
            $service->setConfig($app['config']['layer']);

            return $service;
        });
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}