yansongda / laravel-parsedown
Convert Markdown To Html With Laravel
Installs: 4 839
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 4
Open Issues: 0
Requires
- erusev/parsedown: ~1.7
- friendsofphp/php-cs-fixer: ^2.16
- illuminate/support: ^5.1|^5.2|^5.3|^5.4|^5.5|^5.6|^5.7|^5.8|^6.0|^7.0
Requires (Dev)
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^8.5
README
This Package depends on erusev/parsedown
Requirement
- composer
- laravel | lumen >= 5.1
Installation
$ composer require yansongda/laravel-parsedown
Add service provider(if laravel<5.5 || lumen)
<?php Yansongda\LaravelParsedown\ParsedownServiceProvider::class, // lumen // $app->register(Yansongda\LaravelParsedown\ParsedownServiceProvider::class); // $app->withFacades();
Add alias(if laravel<5.5)
<?php 'LaravelParsedown' => Yansongda\LaravelParsedown\Facades\Parsedown::class,
Config(OPTION)
$ php artisan vendor:publish --provider="Yansongda\\LaravelParsedown\\ParsedownServiceProvider" --tag=laravel-parsedown-config
Lumen user please manually copy the configuration file
Reference: erusev/parsedown
Usage
Using blade
<?php @parsedown('## h2');
Using Helper
<?php {{ parsedown('## h2') }}
License
MIT