PHPackages                             andreasindal/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. [Templating &amp; Views](/categories/templating)
4. /
5. andreasindal/laravel-markdown

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

andreasindal/laravel-markdown
=============================

Simple Blade directive for markdown parsing.

3.1.1(6y ago)183225.2k↑650%27[2 PRs](https://github.com/andreasindal/laravel-markdown/pulls)6MITPHP

Since Mar 20Pushed 5y ago2 watchersCompare

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

READMEChangelog (10)Dependencies (4)Versions (17)Used By (6)

### ⚠️ Important

[](#️-important)

**This project is no longer maintained, will not received any updates and will not support future versions of Laravel.**

---

Laravel-Markdown
================

[](#laravel-markdown)

[![Build Status](https://camo.githubusercontent.com/2bec8480108765765129f3e008308aa9fca6717ac944c92d8adce4d82e48f9bd/68747470733a2f2f7472617669732d63692e6f72672f616e6472656173696e64616c2f6c61726176656c2d6d61726b646f776e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/andreasindal/laravel-markdown)

A small, lightweight and easy-to-use Laravel package for handling markdown. It comes with a facade, a helper function and a Blade directive to make life easier for you.

Laravel versionLaravel-Markdown version5.8, 6.\*[3.1.1](https://github.com/andreasindal/laravel-markdown/tree/3.1.1)5.7[3.0.1](https://github.com/andreasindal/laravel-markdown/tree/3.0.1)5.6[3.0](https://github.com/andreasindal/laravel-markdown/tree/3.0)5.5[2.0](https://github.com/andreasindal/laravel-markdown/tree/2.0)5.3, 5.4[1.1](https://github.com/andreasindal/laravel-markdown/tree/1.1)5.2[1.0](https://github.com/andreasindal/laravel-markdown/tree/1.0)Installation
------------

[](#installation)

To install it, simply pull it down with Composer. Run the `php artisan vendor:publish` command to publish the configuration file.

```
composer require andreasindal/laravel-markdown:"3.0.1"

```

Laravel 5.5 and above use Package Auto-Discovery, so you do not have to manually add the MarkdownServiceProvider.

Usage
-----

[](#usage)

### Blade-directive

[](#blade-directive)

The markdown parser may be used in your Blade templates by using the `@markdown` directive.

```

    {{ $post->title }}

        @markdown($post->body)

```

You can also use a block-style syntax:

```
@markdown
# Hello world

This *text* will be **parsed** to [HTML](http://laravel.com).
@endmarkdown
```

### Facade

[](#facade)

If you registered the Markdown facade as shown above, you can easily parse markdown using it.

```
$markdown = "# Hello";

$html = Markdown::parse($markdown) // Hello
```

### Helper-functions

[](#helper-functions)

```
$html = markdown('# Hello'); // Hello
```

```
$html = markdown_capture(function () {
    echo "# Hello";
    echo "\n\n";
    echo "So **cool**!"
});

// Hello
// So cool!
```

---

Of course, you could also resolve the parser from the service container and use it yourself.

```
$parser = app('Indal\Markdown\Parser');
$html = $parser->parse('# Hello'); // Hello
```

### Drivers (NEW!)

[](#drivers-new)

Laravel-Markdown allows you to add custom markdown drivers. In order to use a custom markdown driver, you need to create a class that implements the `Indal\Markdown\Drivers\MarkdownDriver` interface. The interface contains two methods: `text` and `line`. `text` is used to convert a block of markdown to HTML, while `line` is used to convert a single line.

Laravel-Markdown ships with a `ParsedownDriver` using the [Parsedown-package](http://parsedown.org/) by @erusev.

Credits
-------

[](#credits)

- Mohamed Said [(@themsaid)](https://github.com/themsaid)

License
-------

[](#license)

Licensed under MIT. For more information, see the [LICENSE-file](https://github.com/andreasindal/laravel-markdown/blob/master/LICENSE).

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~158 days

Total

16

Last Release

2293d ago

Major Versions

1.1.6 → 2.0.02017-08-30

2.0.0 → 3.0.02018-03-03

1.1.x-dev → 2.0.x-dev2018-05-07

2.0.x-dev → 3.0.12018-09-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9280922?v=4)[Andreas Alsterholm](/maintainers/alsterholm)[@alsterholm](https://github.com/alsterholm)

---

Top Contributors

[![AlexMac7](https://avatars.githubusercontent.com/u/22553462?v=4)](https://github.com/AlexMac7 "AlexMac7 (1 commits)")[![ngyikp](https://avatars.githubusercontent.com/u/6135313?v=4)](https://github.com/ngyikp "ngyikp (1 commits)")[![skalero01](https://avatars.githubusercontent.com/u/2976641?v=4)](https://github.com/skalero01 "skalero01 (1 commits)")[![tom-on-the-internet](https://avatars.githubusercontent.com/u/8356936?v=4)](https://github.com/tom-on-the-internet "tom-on-the-internet (1 commits)")

---

Tags

bladelaravelmarkdown

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[livewire/blaze

A tool for optimizing Blade component performance by folding them into parent templates

688221.3k17](/packages/livewire-blaze)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)[konekt/html

HTML and Form Builders for the Laravel Framework

24403.2k5](/packages/konekt-html)

PHPackages © 2026

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