bind Parsedown to container

This commit is contained in:
printempw 2016-12-30 20:47:38 +08:00
parent b9aa8618d0
commit 77af4d2f95
2 changed files with 2 additions and 3 deletions

View File

@ -51,5 +51,6 @@ class AppServiceProvider extends ServiceProvider
// register default cipher
$this->app->singleton('cipher', "App\Services\Cipher\\".config('secure.cipher'));
$this->app->singleton('users', \App\Services\Repositories\UserRepository::class);
$this->app->singleton('parsedown', \Parsedown::class);
}
}

View File

@ -206,9 +206,7 @@ if (! function_exists('bs_announcement')) {
function bs_announcement()
{
$parser = new Parsedown();
return $parser->text(option('announcement'));
return app('parsedown')->text(option('announcement'));
}
}