45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* CounterServiceProvider.php
|
|
*
|
|
* PHP version 7
|
|
*
|
|
* @category Providers
|
|
* @package App\Providers
|
|
* @author XE Developers <developers@xpressengine.com>
|
|
* @copyright 2020 Copyright XEHub Corp. <https://www.xehub.io>
|
|
* @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL
|
|
* @link https://xpressengine.io
|
|
*/
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Xpressengine\Counter\Factory;
|
|
|
|
/**
|
|
* Class CounterServiceProvider
|
|
*
|
|
* @category Providers
|
|
* @package App\Providers
|
|
* @author XE Developers <developers@xpressengine.com>
|
|
* @copyright 2020 Copyright XEHub Corp. <https://www.xehub.io>
|
|
* @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL
|
|
* @link https://xpressengine.io
|
|
*/
|
|
class CounterServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register the service provider.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->app->singleton(Factory::class, function ($app) {
|
|
return new Factory($app['xe.interception']);
|
|
});
|
|
$this->app->alias(Factory::class, 'xe.counter');
|
|
}
|
|
}
|