laravel-parsedown maintained by nblackburn
Laravel Parsedown
A Parsedown wrapper for Laravel & Lumen.
Installation
Laravel
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
Facade
To add facade support for Laravel, add the following line inside your config/app.php under the alias section...
'Parsedown' => LaravelParsedown\Facades\Parsedown::class,
Lumen
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
Facade
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);
Settings
| 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 |
Usage
Line
Parsedown::line('To lean more about **Parsedown**, visit [here](http://daringfireball.com/markdown).');
Text
Parsedown::line('To lean more about **Parsedown**, visit [here](http://daringfireball.com/markdown).');
License
This library is licensed under MIT, see license.md for details.
