A Parsedown wrapper for Laravel & Lumen.
Inside config/app.php
add the following line in your providers
LaravelParsedown\Providers\LaravelServiceProvider::class
and then simply run the following artisan command...
php artisan config:publish nblackburn/laravel-parsedown
To add facade support for Laravel, add the following line inside your config/app.php
under the alias section...
'Parsedown' => LaravelParsedown\Facades\Parsedown::class,
Inside bootstrap/app.php
, add the following line:
$app->register(LaravelParsedown\Providers\LumenServiceProvider::class);
then add the following to your .env
file:
# PARSEDOWN
PARSEDOWN_LINKS = true
PARSEDOWN_ESCAPED = false
PARSEDOWN_LINEBREAKS = true
To add facade support, firstly uncomment the following line within bootstrap/app.php
:
// $app->withFacades();
then register the facade like so...
$app->register(LaravelParsedown\Facades\Parsedown::class);
name | description | default |
---|---|---|
links | Controls if links are rendered. | true |
escaped | The maximum length of the hash. | false |
linebreaks | The characters used for hashing. | true |
Parsedown::line('To lean more about **Parsedown**, visit [here](http://daringfireball.com/markdown).');
Parsedown::line('To lean more about **Parsedown**, visit [here](http://daringfireball.com/markdown).');
This library is licensed under MIT, see license.md for details.