PHPackages                             osenco/shortcodes - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. osenco/shortcodes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

osenco/shortcodes
=================

Wordpress-like shortcodes for Laravel

0441PHP

Since May 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/osenco/shortcodes)[ Packagist](https://packagist.org/packages/osenco/shortcodes)[ RSS](/packages/osenco-shortcodes/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Shortcodes
==================

[](#laravel-shortcodes)

Wordpress-style shortcodes for Laravel

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

[](#installation)

### Via Composer

[](#via-composer)

Install this package via composer.

`composer require osenco/shortcodes`

Usage
-----

[](#usage)

### Register Shortcode

[](#register-shortcode)

To register a shortcode, use the helper function `shortcode()->add()` in the constructor method of any Controller or model you want to use.

Pass the shortcode tag as the first argument, and an anonymous function as the second argument, e.g

`\shortcode()->add('tag', function(){ return date('Y); });`

### Use Shortcode

[](#use-shortcode)

Add a shortcode to your content, optionally adding arguments as follows:

`[shortcode_tag]``[shortcode_tag attr="attr1"]`

### Render Content

[](#render-content)

To output content with the shortcodes parsed, use the `shortcode()->do()`

Pass the content you want to output as the argument.

`{!! shortcodes()->do($content) !!}`

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e4a04231f4571a99a35c6e8acb096b5cfd7a28eb73b71e026f2024f353fdaca?d=identicon)[maukoese](/maintainers/maukoese)

---

Top Contributors

[![maukoese](https://avatars.githubusercontent.com/u/14233942?v=4)](https://github.com/maukoese "maukoese (19 commits)")

### Embed Badge

![Health badge](/badges/osenco-shortcodes/health.svg)

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

###  Alternatives

[desandro/imagesloaded

JavaScript is all like \_You images done yet or what?\_

8.9k439.0k1](/packages/desandro-imagesloaded)

PHPackages © 2026

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