Markdown including typographic prettification based on 'SmartyPants'

dev-master 2016-06-24 21:07 UTC

This package is auto-updated.

Last update: 2020-06-21 10:49:37 UTC


Provides a markdown parser facade, with optional typographical prettification using SmartyPants to Laravel 5.x.


Download the package with composer:

composer require willvincent/laravel-markdown

NOTE: You may need to add the following to your composer.json to allow dev packages to be installed:

"minimum-stability": "dev",
"prefer-stable": true

Update your config/app.php file to reference the provider and facade:

'providers' => [
    // ...
'aliases' => [
    // ...

    'Markdown' => willvincent\LaravelMarkdown\Facades\LaravelMarkdownFacade::class,

Run php artisan vendor:publish to copy the default config file into your app's config directory; config/markdown.php


Usage is simple, pass markdown you want to parse (and optionally prettify based on your config settings) to the parse() method of the Markdown facade.

// Assuming $text is a variable populated with markdown...

Presumably most people will use this to display data loaded from their database within a blade template;

  <div class="parsed-markdown-text">{!! Markdown::parse($text) !!}</div>