Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Latest commit

 

History

History
80 lines (55 loc) · 2.46 KB

README.md

File metadata and controls

80 lines (55 loc) · 2.46 KB

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