PHPackages                             seguce92/markdown - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. seguce92/markdown

Abandoned → markdownLibrary[Framework](/categories/framework)

seguce92/markdown
=================

Markdown Is A CommonMark Wrapper For Laravel 5

v1.1(8y ago)08MITPHPPHP &gt;=5.5.9

Since Jul 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/seguce92/markdown)[ Packagist](https://packagist.org/packages/seguce92/markdown)[ RSS](/packages/seguce92-markdown/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (3)Used By (0)

Laravel Markdown
================

[](#laravel-markdown)

Laravel Markdown was created by, and is maintained by [Graham Campbell](https://github.com/GrahamCampbell), and is a [CommonMark](https://github.com/thephpleague/commonmark) wrapper for [Laravel 5](http://laravel.com). It ships with **integration with Laravel's view system** too. Feel free to check out the [change log](CHANGELOG.md), [releases](https://github.com/GrahamCampbell/Laravel-Markdown/releases), [license](LICENSE), and [contribution guidelines](CONTRIBUTING.md).

[![Laravel Markdown](https://cloud.githubusercontent.com/assets/2829600/4432292/c10da636-468c-11e4-9ed9-dac778a15cd5.PNG)](https://cloud.githubusercontent.com/assets/2829600/4432292/c10da636-468c-11e4-9ed9-dac778a15cd5.PNG)

[![StyleCI Status](https://camo.githubusercontent.com/cb7fd30b06dfc6d9f896e7502bfb3ac2716ef43f1dbf30e9e9c5dee1ad029336/68747470733a2f2f7374796c6563692e696f2f7265706f732f31353039303638372f736869656c64)](https://styleci.io/repos/15090687)[![Build Status](https://camo.githubusercontent.com/b47916b74a9d7dc9a69cebe19df37af7b62635bf4d7e25649536336ead8c275b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f47726168616d43616d7062656c6c2f4c61726176656c2d4d61726b646f776e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/GrahamCampbell/Laravel-Markdown)[![Coverage Status](https://camo.githubusercontent.com/5b0a5fbe7424cea9dcb6eeb1adbe53ef0653ffd9ddd0a40d376232aa058f3243/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f47726168616d43616d7062656c6c2f4c61726176656c2d4d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/GrahamCampbell/Laravel-Markdown/code-structure)[![Quality Score](https://camo.githubusercontent.com/794fbc83f35f1ba8a76b10df41b3702d4511734fb802e371ccb220021f800a48/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f47726168616d43616d7062656c6c2f4c61726176656c2d4d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/GrahamCampbell/Laravel-Markdown)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Latest Version](https://camo.githubusercontent.com/2f0d9a994767db6c6db8a4a8926ce22bb9c51e4cbedcda63adfb7f3e45b68019/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f47726168616d43616d7062656c6c2f4c61726176656c2d4d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/GrahamCampbell/Laravel-Markdown/releases)

Installation
------------

[](#installation)

Laravel Markdown requires [PHP](https://php.net) 5.5+. This particular version supports Laravel 5.1, 5.2, 5.3, 5.4 or only.

To get the latest version, simply require the project using [Composer](https://getcomposer.org):

```
$ composer require graham-campbell/markdown
```

Once installed, you need to register the `GrahamCampbell\Markdown\MarkdownServiceProvider` service provider in your `config/app.php`, and optionally alias our facade:

```
        'Markdown' => GrahamCampbell\Markdown\Facades\Markdown::class,
```

Configuration
-------------

[](#configuration)

Laravel Markdown supports optional configuration.

To get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish
```

This will create a `config/markdown.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

There are several config options:

##### Enable View Integration

[](#enable-view-integration)

This option (`'views'`) specifies if the view integration is enabled so you can write markdown views and have them rendered as html. The following extensions are currently supported: `'.md'`, `'.md.php'`, and `'.md.blade.php'`. You may disable this integration if it is conflicting with another package. The default value for this setting is `true`.

##### CommonMark Extensions

[](#commonmark-extensions)

This option (`'extensions'`) specifies what extensions will be automatically enabled. Simply provide your extension class names here. The default value for this setting is `[]`.

##### Renderer Configuration

[](#renderer-configuration)

This option (`'renderer'`) specifies an array of options for rendering HTML. The default value for this setting is `['block_separator' => "\n", 'inner_separator' => "\n", 'soft_break' => "\n"]`.

##### Enable Em Tag Parsing

[](#enable-em-tag-parsing)

This option (`'enable_em'`) specifies if `` parsing is enabled. The default value for this setting is `true`.

##### Enable Strong Tag Parsing

[](#enable-strong-tag-parsing)

This option (`'enable_strong'`) specifies if `` parsing is enabled. The default value for this setting is `true`.

##### Enable Asterisk Parsing

[](#enable-asterisk-parsing)

This option (`'use_asterisk'`) specifies if `*` should be parsed for emphasis. The default value for this setting is `true`.

##### Enable Underscore Parsing

[](#enable-underscore-parsing)

This option (`'use_underscore'`) specifies if `_` should be parsed for emphasis. The default value for this setting is `true`.

##### HTML Input

[](#html-input)

This option (`'html_input'`) specifies how to handle untrusted HTML input. The default value for this setting is `'strip'`.

##### Allow Unsafe Links

[](#allow-unsafe-links)

This option (`'allow_unsafe_links'`) specifies whether to allow risky image URLs and links. The default value for this setting is `true`.

Usage
-----

[](#usage)

##### Facades\\Markdown

[](#facadesmarkdown)

This facade will dynamically pass static method calls to the `'markdown'` object in the ioc container which by default is an instance of `League\CommonMark\Converter`.

##### MarkdownServiceProvider

[](#markdownserviceprovider)

This class contains no public methods of interest. This class should be added to the providers array in `config/app.php`. This class will setup ioc bindings.

##### Real Examples

[](#real-examples)

Here you can see an example of just how simple this package is to use.

```
use GrahamCampbell\Markdown\Facades\Markdown;

Markdown::convertToHtml('foo'); // foo
```

If you prefer to use dependency injection over facades like me, then you can easily inject the class like so:

```
use Illuminate\Support\Facades\App;
use League\CommonMark\Converter;

class Foo
{
    protected $converter;

    public function __construct(Converter $converter)
    {
        $this->converter = $converter;
    }

    public function bar()
    {
        return $this->converter->convertToHtml('foo');
    }
}

App::make('Foo')->bar();
```

And don't forget, that's just the basics. We also support extension through listening for the resolving event from the container, and we ship with integration with Laravel's view system.

##### Further Information

[](#further-information)

There are other classes in this package that are not documented here (such as the engine and compiler classes). This is because they are not intended for public use and are used internally by this package.

### Extensions

[](#extensions)

As hinted in the configuration docs, CommonMark can be modified using extensions. There are some very good examples in the customization section of the CommonMark docs for how to create custom parsers and renders in the customization section: .

Alt Three's Emoji package also serves as a good example of how to implement the full deal: . In particular, note the presence of the [Extension class](https://github.com/AltThree/Emoji/blob/master/src/EmojiExtension.php), and the fact that you can add it to the extensions array in your `app/config/markdown.php` file. If you don't see the file in your config folder, you would need to run `php artisan vendor:publish`.

Security
--------

[](#security)

If you discover a security vulnerability within this package, please send an e-mail to Graham Campbell at . All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

Laravel Markdown is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3279d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7014932?v=4)[Sergio G. Cruz Espinoza](/maintainers/seguce92)[@seguce92](https://github.com/seguce92)

---

Top Contributors

[![seguce92](https://avatars.githubusercontent.com/u/7014932?v=4)](https://github.com/seguce92 "seguce92 (2 commits)")

---

Tags

frameworklaravelmarkdownGraham CampbellGrahamCampbellcommonmarkLaravel-Markdowncommon mark

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/seguce92-markdown/health.svg)

```
[![Health](https://phpackages.com/badges/seguce92-markdown/health.svg)](https://phpackages.com/packages/seguce92-markdown)
```

###  Alternatives

[graham-campbell/markdown

Markdown Is A CommonMark Wrapper For Laravel

1.3k7.4M65](/packages/graham-campbell-markdown)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k28.4M137](/packages/laravel-cashier)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M123](/packages/laravel-pulse)[graham-campbell/manager

Manager Provides Some Manager Functionality For Laravel

39422.1M143](/packages/graham-campbell-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
