This Package depends on erusev/parsedown
- composer
- laravel | lumen >= 5.1
$ composer require yansongda/laravel-parsedown
<?php
Yansongda\LaravelParsedown\ParsedownServiceProvider::class,
// lumen
// $app->register(Yansongda\LaravelParsedown\ParsedownServiceProvider::class);
// $app->withFacades();
<?php
'LaravelParsedown' => Yansongda\LaravelParsedown\Facades\Parsedown::class,
$ php artisan vendor:publish --provider="Yansongda\\LaravelParsedown\\ParsedownServiceProvider" --tag=laravel-parsedown-config
Lumen user please manually copy the configuration file
config | desc | default |
---|---|---|
breaksEnabled | automatic line breaks | true |
markupEscaped | escapes markup (HTML) | true |
urlsLinked | automatic linking of URLs | true |
safeMode | safeMode | false |
Reference: erusev/parsedown
<?php
@parsedown('## h2');
<?php
{{ parsedown('## h2') }}
MIT