Skip to content

yansongda/laravel-parsedown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel-Parsedown

Scrutinizer Code Quality Build Status Latest Stable Version Total Downloads Latest Unstable Version License

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

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

Usage

Using blade

<?php

@parsedown('## h2');

Using Helper

<?php

{{ parsedown('## h2') }}

License

MIT

About

Convert Markdown To Html With Laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages