<?php

namespace Buckhill\LogMe\Provider;

use Illuminate\Support\ServiceProvider;

class LogMeProvider extends ServiceProvider
{
    public function register()
    {
        $this->mergeConfig();
    }

    public function boot()
    {
        $this->publishes([
            $this->getConfigPath() => config_path('logme.php')
        ], 'logmeconfig');
    }

    private function mergeConfig()
    {
        $path = $this->getConfigPath();

        $this->mergeConfigFrom($path, 'logme');
    }

    protected function getConfigPath()
    {
        return __DIR__ . '/../../config/logme.php';
    }
}