maxhoffmann / parsedown-laravel
A parsedown (markdown) wrapper for Laravel
Installs: 58 794
Dependents: 0
Suggesters: 0
Security: 0
Stars: 55
Watchers: 7
Forks: 5
Open Issues: 0
Requires
- php: >=5.3.0
- erusev/parsedown: *
This package is not auto-updated.
Last update: 2024-12-17 04:09:25 UTC
README
A Parsedown wrapper for Laravel to compile markdown to HTML.
Parsedown is fast and supports GitHub flavored markdown.
Installation
require package in composer.json
"require": { "laravel/framework": "4.1.*", "maxhoffmann/parsedown-laravel": "dev-master" },
add parsedown’s service provider in config/app.php
'providers' => array( 'Illuminate\Foundation\Providers\ArtisanServiceProvider', ... 'Illuminate\Workbench\WorkbenchServiceProvider', 'MaxHoffmann\Parsedown\ParsedownServiceProvider' ),
and parsedown’s facade (also in config/app.php
)
'aliases' => array( 'App' => 'Illuminate\Support\Facades\App', ... 'View' => 'Illuminate\Support\Facades\View', 'Markdown' => 'MaxHoffmann\Parsedown\ParsedownFacade', ),
Usage
Markdown::parse('__Hello__ Markdown!'); // returns '<p><strong>Hello</strong> Markdown!</p>'