PHPackages                             vtalbot/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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. vtalbot/markdown

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

vtalbot/markdown
================

Markdown compiler for Laravel 5

3.0.0(5y ago)100204.2k—8%21[2 issues](https://github.com/vtalbot/markdown/issues)[1 PRs](https://github.com/vtalbot/markdown/pulls)3MITPHP

Since Jan 22Pushed 3y ago6 watchersCompare

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

READMEChangelog (7)Dependencies (3)Versions (14)Used By (3)

Markdown Compiler for Laravel
=============================

[](#markdown-compiler-for-laravel)

### Installation

[](#installation)

#### For Laravel 4

[](#for-laravel-4)

1. Run `composer require vtalbot/markdown:1.5`
2. Run `php artisan config:publish vtalbot/markdown`
3. Then edit `config.php` in `app/config/packages/vtalbot/markdown` to your needs.
4. Add `'VTalbot\Markdown\MarkdownServiceProvider',` to `providers` in `app/config/app.php` and `'Markdown' => 'VTalbot\Markdown\Facades\Markdown',` to `aliases` in `app/config/app.php`

#### For Laravel 5+

[](#for-laravel-5)

1. Run `composer require vtalbot/markdown:2.0`
2. Run `php artisan vendor:publish --provider=“VTalbot\Markdown\MarkdownServiceProvider”`
3. Then edit `markdown.php` in your `config` directory to your needs.
4. Add `VTalbot\Markdown\MarkdownServiceProvider::class` to `providers` in `config/app.php` and `'Markdown' => VTalbot\Markdown\Facades\Markdown::class` to `aliases` in `config/app.php`

### Usage

[](#usage)

```
http://domain.name/test.md

```

If `test.md` doesn't exists in the `public` directory, it will search for `test.md` in `app/markdown` directory. If found, compile it if needed and return the result.

```
Markdown::make('file-in-markdown-directory');
```

Or, you can compile a simple string:

```
Markdown::string('#test');
```

To handle markdown file not found:

```
Markdown::setNotFoundHandler(function($file) { return 'Markdown file not found'; });
Markdown::setNotFoundHandler('MarkdownController@missing');
```

### Configuration

[](#configuration)

KeyDefault valueDescription`paths``array('/markdown')`Directory where to find the markdown files.`routes``array('',)`Routes prefixes.`extensions``array('markdown','md')`Extensions used to set routes.`add_routes``true`Enable the creation of routes.`empty_element_suffix``' />'`Suffix for empty element (br, hr).`tab_width``4`Tab character width.`no_markup``false`Prevent HTML tags to be passed to output.`no_entities``false`Convert entities like &amp;lt; to &amp;amp;.`predef_urls``array()`Add reference for urls. `array('ref' => '//goo.gl')`: \[google\]\[ref\]`predef_titles``array()`Same as `predef_urls`.`use_extra``true`Use Markdown with extra, eg.: [fenced code block](http://michelf.ca/projects/php-markdown/extra/#fenced-code-blocks).`fn_id_prefix``''`Prefix for ID attributes generated by [footnotes](http://michelf.ca/projects/php-markdown/extra/#footnotes).`fn_link_title``''`Title for [footnotes](http://michelf.ca/projects/php-markdown/extra/#footnotes) links.`fn_backlink_title``''`Same as `fn_link_title`.`fn_link_class``'footnote-ref'`CSS class for [footnotes](http://michelf.ca/projects/php-markdown/extra/#fenced-code-blocks) links and backlinks.`fn_backlink_class``'footnote-backref'`Same as `fn_link_class`.`code_class_prefix``''`Prepend CSS class to [fenced code block](http://michelf.ca/projects/php-markdown/extra/#fenced-code-blocks).`code_attr_on_pre``false`Put attributes on `pre` instead of `code`.`predef_abbr``array()`Create predefine [abbreviations](http://michelf.ca/projects/projects/php-markdown/extra/#abbr).For more information on the Markdown configuration, you may refer to  .

### Changelog

[](#changelog)

#### 2.0

[](#20)

- Add support for Laravel 5

#### 1.5

[](#15)

- Change deprecated dependency.
- Add Markdown file not found handler.
- Add configurations based on the new dependency.
- Add some tests.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity51

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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 ~296 days

Recently: every ~624 days

Total

11

Last Release

1904d ago

Major Versions

1.5.1 → 2.02015-09-12

2.0.1 → 3.0.02021-03-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd5ebc77c8a034abfc360655e03bc390ede754e1d9fddecffe3a17fb0f356d12?d=identicon)[vtalbot](/maintainers/vtalbot)

---

Top Contributors

[![vtalbot](https://avatars.githubusercontent.com/u/1474848?v=4)](https://github.com/vtalbot "vtalbot (24 commits)")[![nonoesp](https://avatars.githubusercontent.com/u/1243210?v=4)](https://github.com/nonoesp "nonoesp (8 commits)")[![maddhatter](https://avatars.githubusercontent.com/u/4449339?v=4)](https://github.com/maddhatter "maddhatter (5 commits)")[![heathdutton](https://avatars.githubusercontent.com/u/302215?v=4)](https://github.com/heathdutton "heathdutton (2 commits)")[![Anahkiasen](https://avatars.githubusercontent.com/u/1321596?v=4)](https://github.com/Anahkiasen "Anahkiasen (1 commits)")[![nelsonzheng](https://avatars.githubusercontent.com/u/261160?v=4)](https://github.com/nelsonzheng "nelsonzheng (1 commits)")[![barbuslex](https://avatars.githubusercontent.com/u/113057?v=4)](https://github.com/barbuslex "barbuslex (1 commits)")

---

Tags

laravelmarkdownmdilluminate

### Embed Badge

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

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

###  Alternatives

[torchlight/torchlight-commonmark

A Commonmark extension for Torchlight, the syntax highlighting API.

29256.6k6](/packages/torchlight-torchlight-commonmark)[cartalyst/interpret

A driver-based content rendering package, with support for HTML, Markdown &amp; plain text. You can register custom drivers for custom content types.

1914.7k](/packages/cartalyst-interpret)

PHPackages © 2026

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