yansongda/laravel-parsedown

Convert Markdown To Html With Laravel

v1.2.2 2020-03-01 13:28 UTC

This package is auto-updated.

Last update: 2024-11-29 03:53:02 UTC


README

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

Reference: erusev/parsedown

Usage

Using blade

<?php

@parsedown('## h2');

Using Helper

<?php

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

License

MIT