PHPackages                             haleks/laravel-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. haleks/laravel-markdown

Abandoned → [haleks/writedown](/?search=haleks%2Fwritedown)ArchivedLibrary[Framework](/categories/framework)

haleks/laravel-markdown
=======================

Laravel Markdown integrate markdown 'curly' braces inside the blade template engine, adding view extension and also giving the possibility of extending CommonMark.

0.3.1(9y ago)77.7k↓50%2MITPHPPHP &gt;=5.5.9

Since Sep 4Pushed 9y ago5 watchersCompare

[ Source](https://github.com/haleks/laravel-markdown)[ Packagist](https://packagist.org/packages/haleks/laravel-markdown)[ RSS](/packages/haleks-laravel-markdown/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (8)Versions (10)Used By (0)

[![haleks logo](https://camo.githubusercontent.com/5364eb3b2e88fe0d4684110519cd34dea19a4b919d0d4f6e514c257c58947687/68747470733a2f2f68616c656b732e63612f696d616765732f6c6f676f2f68616c656b735b6d61726b646f776e2d6f72616e67655d2e706e67)](https://haleks.ca)

Laravel Markdown
[![travic ci](https://camo.githubusercontent.com/17334d1fa0cdba4f5e0d6cd195aa2b4c115349d305c877441d8fcacb06ff99be/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f68616c656b732f6c61726176656c2d6d61726b646f776e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/haleks/laravel-markdown)[![latest release](https://camo.githubusercontent.com/8aae698bf3b4eb8c951fd99fbae92646863069bad12fbfae941e23e211c07552/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f68616c656b732f6c61726176656c2d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/haleks/laravel-markdown/releases)[![code climate](https://camo.githubusercontent.com/7fbbde509c2986b6b11e8713345323e268ce3533b6b47bca205f91250110d8a8/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f68616c656b732f6c61726176656c2d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/haleks/laravel-markdown)[![liscense](https://camo.githubusercontent.com/7da311561b2cc08881b8ac77d85a45e0d0f59ef4f2135850cfe560a0b503e44b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6666346330302e7376673f7374796c653d666c61742d737175617265)](LISCENCE)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#laravel-markdown)

Laravel Markdown integrate markdown "curly" braces inside the blade template engine, also giving the possibility of extending CommonMark.

Abandoned
---------

[](#abandoned)

Abandoned in favor of the more flexible [Writedown](https://github.com/haleks/writedown). Which add supports for multiple markdown parsers.

Documentation
-------------

[](#documentation)

### Pre-Installation

[](#pre-installation)

This project requires that the following packages be formerly installed.

[PHP](https://php.net) 5.5+ / [HHVM](http://hhvm.com) 3.6+

[Composer](https://github.com/composer/composer)

```
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
```

### Installation

[](#installation)

#### Pulling the package

[](#pulling-the-package)

Install via composer's require command:

```
composer require haleks/laravel-markdown
```

Install via your projects' `composer.json`:

```
{
    ...
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "haleks/laravel-markdown": "0.3.*"
    },
    ...
}
```

Once the package is in the require section you will need to run composer's `install` or `update` command to pull in the code:

```
# Install
composer install -o

# or Update
composer update -o
```

**Note**: The trailing `-o` is an optional option which is used to optimize the autoloader and is considered best practice.

#### Registering the package

[](#registering-the-package)

Once the package as been successfully pulled you will need to register the package's service provider to the Laravel's app and optionally add the package's facade by modifying `config/app.php`:

```
...
    'providers' => [
        ...
        Haleks\Markdown\MarkdownServiceProvider::class,

    ],
...

    'aliases' => [
        ...
        // Optional facade
        'Markdown' => Haleks\Markdown\Facades\Markdown::class,

    ],
...
```

#### Configuration

[](#configuration)

Laravel Markdown supports optional configuration.

You will need to pull the configuration in you app's configuration folder to make modifications to the default configuration. You can achieve this with the following artisan command:

```
php artisan vendor:publish
```

The configuration file will be created at `config/markdown.php`.

##### Options

[](#options)

###### Enable Markdown Tags

[](#enable-markdown-tags)

The option `tags` specifies if you wish to extend blade with markdown tags. If set to `true` you will be able to render markdown via the "curly" braces `{%` `%}` inside your `blade.php` files.

###### Enable Views Extensions

[](#enable-views-extensions)

The option `views` specifies if you wish to intergrate extend views extensions. If set to `true` you will be able to render markdown views with the following extensions: `*.md`, `*.md.php`, and `*.md.blade.php`.

###### Enable Views Extensions

[](#enable-views-extensions-1)

The option `extensions` specifies which extension you wish to intergrate inside the CommonMark converter. It uses CommonMark environment's `addExtension()` method to load the extensions.

### How To Use

[](#how-to-use)

#### Facades

[](#facades)

You may use the facade to pass markdown and return the equivalent html. The Markdown facade has simply one method `convertToHtml('markdown here')`.

##### Inside classes

[](#inside-classes)

```
$html = Markdown::convertToHtml('# title');
```

##### Blade Views

[](#blade-views)

You will need to use the unescaped echo because the converter returns html.

```
{!! Markdown::convertToHtml('# title') !!}
```

#### Tags Extensions

[](#tags-extensions)

If the `tags` configuration is set to `true`. You may use the following "curly" brace short-cut in your `*.blade.php` files.

```
{% '# title' %}
```

Like Blade's escaped echo `{{` `}}` the markdown tags are also equipped with the short-cut ternary statement. If the pass variable that doesn't exists the markdown will only parse the default.

```
{% $variable or 'default' %}
```

If you are using a JavaScript template engine which uses the markdown "curly" braces, just like Blade's "curly" braces, you may add a leading `@` to leave it untouched for the JavaScript template engine.

```
@{% javascript stuff %}
```

#### Views Extensions

[](#views-extensions)

If the `views` configuration is set to `true`. You may use views with the following extensions: `*.md`, `*.md.php`, and `*.md.blade.php`. The `*.md` views will parse the markdown and return the html equivalent, while the `*.md.php`, and `*.md.blade.php` will parse the php first and followed by the markdown.

```
// *.md
# title

text
```

```
// *.md.php
#

text
```

```
// *.md.php

text
```

```
// *.md.blade.php
# {{ 'title' }}

text
```

```
// *.md.blade.php
{{ '# title' }}

text
```

All the exemple above will output:

```
title
text
```

#### Markdown Extensions

[](#markdown-extensions)

You may extend the Markdown compiler with any extension that uses CommonMark environment `addExtension()` method.

Here are a few extension known to be compatible:

- [Attributes Extension](https://github.com/webuni/commonmark-table-extension)
- [Tables Extension](https://github.com/webuni/commonmark-table-extension)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

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 ~53 days

Recently: every ~61 days

Total

9

Last Release

3476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fc6de9db47be8ba2e84fa7e20a5377a229f67486c4672c85131ea6e43ece2b9?d=identicon)[haleksandre](/maintainers/haleksandre)

---

Top Contributors

[![haleksandre](https://avatars.githubusercontent.com/u/8269937?v=4)](https://github.com/haleksandre "haleksandre (19 commits)")

---

Tags

frameworklaravelmarkdowncommonmarkLaravel-Markdowncommon markAlex VilleneuveAlexVilleneuveAlexandre VilleneuvehaleksAlexandreVilleneuvehaleksandre

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[graham-campbell/markdown

Markdown Is A CommonMark Wrapper For Laravel

1.3k7.1M64](/packages/graham-campbell-markdown)[laravel/cashier

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

2.5k25.9M107](/packages/laravel-cashier)[rebing/graphql-laravel

Laravel wrapper for PHP GraphQL

2.2k7.1M26](/packages/rebing-graphql-laravel)[laravel/pulse

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

1.7k12.1M99](/packages/laravel-pulse)[laravel/lumen-framework

The Laravel Lumen Framework.

1.5k26.2M709](/packages/laravel-lumen-framework)[graham-campbell/manager

Manager Provides Some Manager Functionality For Laravel

39221.1M134](/packages/graham-campbell-manager)

PHPackages © 2026

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