<?php

namespace AuthStack\Installer\Provider;

use Illuminate\Support\ServiceProvider;
use AuthStack\Installer\Services\License;

class LicenseCheckerProvider extends ServiceProvider
{
    public function register()
    {
        $this->app->singleton('LicenseChecker', function($app)
        {
            if(function_exists('config'))
            {
                $service = new License(config('authstack.publickey'));
            }
            else
            {
                $service = new License('');
            }

            return $service;
        });
    }
}