nblackburn / laravel-parsedown
A parsedown wrapper for Laravel and Lumen.
Installs: 37
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 3
pkg:composer/nblackburn/laravel-parsedown
Requires
- php: >=5.6.0
- erusev/parsedown: ^1.6.0
- illuminate/support: ^5.2.0
Requires (Dev)
- phpunit/phpunit: ^5.0.0
This package is not auto-updated.
Last update: 2023-10-14 13:40:11 UTC
README
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.