bind Parsedown to container
This commit is contained in:
parent
b9aa8618d0
commit
77af4d2f95
|
|
@ -51,5 +51,6 @@ class AppServiceProvider extends ServiceProvider
|
||||||
// register default cipher
|
// register default cipher
|
||||||
$this->app->singleton('cipher', "App\Services\Cipher\\".config('secure.cipher'));
|
$this->app->singleton('cipher', "App\Services\Cipher\\".config('secure.cipher'));
|
||||||
$this->app->singleton('users', \App\Services\Repositories\UserRepository::class);
|
$this->app->singleton('users', \App\Services\Repositories\UserRepository::class);
|
||||||
|
$this->app->singleton('parsedown', \Parsedown::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -206,9 +206,7 @@ if (! function_exists('bs_announcement')) {
|
||||||
|
|
||||||
function bs_announcement()
|
function bs_announcement()
|
||||||
{
|
{
|
||||||
$parser = new Parsedown();
|
return app('parsedown')->text(option('announcement'));
|
||||||
|
|
||||||
return $parser->text(option('announcement'));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user