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

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

birdcar/markdown-laravel
========================

Laravel integration for Birdcar Flavored Markdown

v0.1.0(1mo ago)051MITPHPPHP ^8.2

Since May 29Pushed 1mo agoCompare

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

READMEChangelogDependencies (5)Versions (2)Used By (1)

birdcar/markdown-laravel
========================

[](#birdcarmarkdown-laravel)

Laravel integration for [Birdcar Flavored Markdown](../../README.md) (BFM).

Provides a configured `MarkdownConverter` singleton, `Str` macros, a Blade directive for loading styles, and publishable config/assets.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, or 12
- `birdcar/markdown-php` (pulled in automatically)

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

[](#installation)

```
composer require birdcar/markdown-laravel
```

The service provider is auto-discovered.

Usage
-----

[](#usage)

### String macros

[](#string-macros)

```
use Illuminate\Support\Str;

// Full BFM render (block-level HTML)
Str::bfm('# Hello **world**');

// Inline render (strips wrapping  tag)
Str::inlineBfm('Hello **world**');
```

### Blade directive

[](#blade-directive)

Include the BFM stylesheet in your layout:

```

    @bfmStyles

```

This outputs a `` tag if you've published the CSS to `public/vendor/bfm/`, otherwise it inlines the stylesheet in a `` tag.

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

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=bfm-config
```

This creates `config/bfm.php`:

```
return [
    // Output format: 'html', 'email', or 'plain'
    'profile' => 'html',

    // Custom resolvers (resolved from the container)
    'resolvers' => [
        'mention' => null, // class implementing MentionResolverInterface
        'embed'   => null, // class implementing EmbedResolverInterface
    ],
];
```

### Resolvers

[](#resolvers)

To handle `@mentions` or `!embed[...]` syntax, create classes implementing `MentionResolverInterface` or `EmbedResolverInterface` from the core package and reference them in config. They're resolved from the container, so you can inject dependencies.

Publishing assets
-----------------

[](#publishing-assets)

```
# Publish the CSS to public/vendor/bfm/
php artisan vendor:publish --tag=bfm-assets
```

Publishing is optional. Without it, `@bfmStyles` inlines the CSS directly. Publishing is better for production since the browser can cache the external stylesheet.

Gotchas
-------

[](#gotchas)

- **All BFM extensions are always enabled.** There are no config toggles for individual extensions (callouts, tasks, mentions, embeds).
- **`Str::bfm()` is a dynamic macro.** PHPStan won't recognize it statically. If you use PHPStan, add an ignore for calls to `Str::bfm()` and `Str::inlineBfm()`.
- **`@bfmStyles` is evaluated at runtime**, not at Blade compile time. No need to run `view:clear` after publishing assets.

Development
-----------

[](#development)

```
cd packages/laravel
composer install
composer test      # Run tests
composer analyse   # Run PHPStan (level 8)
```

Tests use Orchestra Testbench. The `composer.json` includes a path repository pointing to `../../` so it can resolve the core `birdcar/markdown-php` package from the monorepo root.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance89

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

56d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/434063?v=4)[Nick Cannariato](/maintainers/birdcar)[@birdcar](https://github.com/birdcar)

---

Top Contributors

[![birdcar](https://avatars.githubusercontent.com/u/434063?v=4)](https://github.com/birdcar "birdcar (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.2k](/packages/craftcms-cms)[moonshine/moonshine

Laravel administration panel

1.3k253.1k86](/packages/moonshine-moonshine)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

728176.2k14](/packages/tallstackui-tallstackui)[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.

45444.2k1](/packages/pressbooks-pressbooks)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5443.8k](/packages/hasinhayder-tyro-dashboard)[ublabs/blade-simple-icons

A package to easily make use of Simple Icons in your Laravel Blade views.

1963.4k](/packages/ublabs-blade-simple-icons)

PHPackages © 2026

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