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

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

mindtwo/laravel-markdown
========================

This is my package laravel-markdown

1.0.1(1y ago)05MITPHPPHP ^8.2

Since Sep 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mindtwo/laravel-markdown)[ Packagist](https://packagist.org/packages/mindtwo/laravel-markdown)[ Docs](https://github.com/mindtwo/laravel-markdown)[ GitHub Sponsors](https://github.com/mindtwo)[ RSS](/packages/mindtwo-laravel-markdown/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (13)Versions (3)Used By (0)

Laravel Markdown
================

[](#laravel-markdown)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9aa742e35599030228e0d56e63c0f62c8e8122b8ce64130c6e766db89f09d5ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696e6474776f2f6c61726176656c2d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mindtwo/laravel-markdown)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5907cc0496e563cf30c263655fc7204bbc4a69b17c5287b9e627020136b894d1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d696e6474776f2f6c61726176656c2d6d61726b646f776e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mindtwo/laravel-markdown/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/b67e27aeaa70f1e6703f7dcc990a4f61c5a61d98a5e9f92f0deab1f2371e96b0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d696e6474776f2f6c61726176656c2d6d61726b646f776e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/mindtwo/laravel-markdown/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/c2b6ac1f3435a55f260979a8728636dbeb7abc2940a948bf10441a9591911a64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696e6474776f2f6c61726176656c2d6d61726b646f776e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mindtwo/laravel-markdown)

`laravel-markdown` is a simple, lightweight package for cleaning up and adjusting markdown content in Laravel applications. It provides functionality to remove bold formatting from markdown headlines and dynamically adjust the heading levels in markdown content based on a configurable maximum level. This is especially useful when rendering user-generated content and ensuring consistency in markdown formatting across your application.

Features
--------

[](#features)

- **Remove Bold from Headlines**: Automatically strip bold formatting (e.g., `**Heading**`) from markdown headings.
- **Adjust Headline Levels**: Dynamically adjust markdown heading levels (e.g., `#` to `##`, `##` to `###`, etc.) based on a configurable maximum level.

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

[](#installation)

You can install the package via composer:

```
composer require mindtwo/laravel-markdown
```

Usage
-----

[](#usage)

To clean up your markdown content, you can use the `CleanupMarkdown` class, which handles both removing bold formatting from headlines and adjusting headline levels.

### Example

[](#example)

```
use mindtwo\LaravelMarkdown\CleanupMarkdown;

$markdown = "# **Bold Heading**\n## **Bold Subheading**";
$cleanedMarkdown = (new CleanupMarkdown())->execute($markdown, 2);

echo $cleanedMarkdown;
// Outputs:
// ## Heading
// ### Subheading
```

In this example, the maximum headline level is set to `2`, so all `#` headings are adjusted to `##`, and bold formatting is removed from both headings.

Customization
-------------

[](#customization)

You can specify the maximum headline level when calling the `execute` method. This determines how the headline levels will be adjusted:

```
$cleanedMarkdown = (new CleanupMarkdown())->execute($markdown, 3); // Max headline level is 3
```

Testing
-------

[](#testing)

To run the package's tests, use:

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Contributions are welcome! Please see [CONTRIBUTING](CONTRIBUTING.md) for details on how to contribute.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover any security-related issues, please review [our security policy](../../security/policy) for how to report them.

Credits
-------

[](#credits)

- [mindtwo GmbH](https://github.com/mindtwo)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Total

2

Last Release

607d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cc86fe6179314d204b14d1c81eb09a87ef84b0bcf2360dcd981171d1346c077?d=identicon)[mindtwo](/maintainers/mindtwo)

---

Top Contributors

[![jonasemde](https://avatars.githubusercontent.com/u/5083193?v=4)](https://github.com/jonasemde "jonasemde (7 commits)")

---

Tags

laravelmarkdownmindtwo

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-markdown-response

Serve markdown versions of your HTML pages to AI agents and bots

6512.6k](/packages/spatie-laravel-markdown-response)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[buzzylab/laradown

A New Markdown parser for Laravel built on parsedown

317.3k](/packages/buzzylab-laradown)[grazulex/laravel-atlas

Laravel Atlas scans your Laravel project to generate a complete, structured map of its internal components — models, controllers, routes, jobs, observers, events, commands, and more — and exports visual or machine-readable representations in formats like Mermaid, Markdown, JSON, or PDF.

161.7k](/packages/grazulex-laravel-atlas)

PHPackages © 2026

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