Added update checking, part of #109

This commit is contained in:
James Brooks
2015-11-28 17:35:49 +00:00
parent e46ee644ae
commit b5b60fff45
12 changed files with 180 additions and 18 deletions

View File

@@ -0,0 +1,45 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers;
use CachetHQ\Cachet\GitHub\Release;
use Illuminate\Support\ServiceProvider;
class GitHubServiceProvider extends ServiceProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->registerRelease();
}
/**
* Register the releases class.
*
* @return void
*/
protected function registerRelease()
{
$this->app->singleton('cachet.release', function ($app) {
$cache = $app['cache'];
$config = $app['config'];
return new Release($cache, $config);
});
$this->app->alias('cachet.release', Release::class);
}
}