Download the PHP package birdcar/markdown-laravel without Composer
On this page you can find all versions of the php package birdcar/markdown-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download birdcar/markdown-laravel
More information about birdcar/markdown-laravel
Files in birdcar/markdown-laravel
Package markdown-laravel
Short Description Laravel integration for Birdcar Flavored Markdown
License MIT
Informations about the package markdown-laravel
birdcar/markdown-laravel
Laravel integration for Birdcar Flavored Markdown (BFM).
Provides a configured MarkdownConverter singleton, Str macros, a Blade directive for loading styles, and publishable config/assets.
Requirements
- PHP 8.2+
- Laravel 10, 11, or 12
birdcar/markdown-php(pulled in automatically)
Installation
The service provider is auto-discovered.
Usage
String macros
Blade directive
Include the BFM stylesheet in your layout:
This outputs a <link> tag if you've published the CSS to public/vendor/bfm/, otherwise it inlines the stylesheet in a <style> tag.
Configuration
Publish the config file:
This creates config/bfm.php:
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 is optional. Without it, @bfmStyles inlines the CSS directly. Publishing is better for production since the browser can cache the external stylesheet.
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 toStr::bfm()andStr::inlineBfm().@bfmStylesis evaluated at runtime, not at Blade compile time. No need to runview:clearafter publishing assets.
Development
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.
All versions of markdown-laravel with dependencies
birdcar/markdown-php Version self.version
illuminate/support Version ^12.0|^13.0