matt-bartlett / markdown
Markdown compiler for Laravel 5
Installs: 376
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/matt-bartlett/markdown
Requires
- php: >=5.4.0
- illuminate/support: ~5.0
- michelf/php-markdown: 1.5.0
This package is not auto-updated.
Last update: 2018-07-18 17:57:39 UTC
README
A simple wrapper around Michelfs PHP Markdown parser. This was developed for my own use of constructing valid Markdown from a given string. I will look to extend this package at some point.
Installing
Begin by installing this package through Composer. Edit your project's composer.json file to require matt-bartlett/markdown:
"require": {
"matt-bartlett/markdown": "0.1.2"
}
Next, update Composer from the Terminal:
composer update
Add this service provider to your config. Open config/app.php and insert the following line into your providers array:
MattBartlett\Markdown\MarkdownServiceProvider::class
Make use of the facade and add this to your aliases array:
'Markdown' => MattBartlett\Markdown\Facades\Markdown::class
All done.
Usage
You can either inject the Markdown class into a method or call it directly from a view. For example:
Markdown::string('````$var = "Hello World";```')