yansongda/laravel-parsehtml

Convert Html To Markdown With Laravel

v1.1.0 2018-03-28 08:37 UTC

This package is auto-updated.

Last update: 2024-12-10 22:09:57 UTC


README

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

This Package depends on league/html-to-markdown

Installation

$ composer require yansongda/laravel-parsehtml

Add service provider

<?php

Yansongda\LaravelParsehtml\ParsehtmlServiceProvider::class,

Add alias

<?php

'LaravelParsehtml' => Yansongda\LaravelParsehtml\Facades\Parsehtml::class,

Config(OPTION)

$ php artisan vendor:publish --provider="Yansongda\\LaravelParsehtml\\ParsehtmlServiceProvider" --tag=laravel-html-config

Reference: league/html-to-markdown

Usage

Using blade

<?php

@parsehtml('<h2>blablabla</h2>');

Using Helper

<?php

{{ parsehtml('<h2>blablabla</h2>') }}

License

MIT