matt-bartlett/markdown

This package is abandoned and no longer maintained. No replacement package was suggested.

Markdown compiler for Laravel 5

0.1.3 2015-07-05 18:42 UTC

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";```')