PHPackages                             luceos/minis - 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. luceos/minis

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

luceos/minis
============

Mini extenders for Flarum

0.1-beta.1(1y ago)08MITPHP

Since Aug 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/luceos/flarum-ext-minis)[ Packagist](https://packagist.org/packages/luceos/minis)[ GitHub Sponsors](https://github.com/luceos)[ Patreon](https://www.patreon.com/luceos)[ RSS](/packages/luceos-minis/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Minis
=====

[](#minis)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![Latest Stable Version](https://camo.githubusercontent.com/f9f9aa87b310f1ad192b14352a96cc2e618d4400e0c105b2a63b4fe663eb5202/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c7563656f732f6d696e69732e737667)](https://packagist.org/packages/luceos/minis) [![Total Downloads](https://camo.githubusercontent.com/e4b43c9134d237b16260285d2b2852daea94db0763685594ad2b33ce15ab33ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c7563656f732f6d696e69732e737667)](https://packagist.org/packages/luceos/minis)

A [Flarum](http://flarum.org) extension that is not really an extension.

Every Flarum installation comes with a file `extend.php` which allows you use any [Flarum extender](https://docs.flarum.org/extenders/) without creating a full-fledged extension. For the past several years I have been writing [several examples](https://github.com/luceos/flarum-extender-examples) to show people how to use this. I thought it wise to move some of these into their own extension so that you can use these extenders with less code.

Your `extend.php` lives in the root installation path of Flarum, next to `config.php` and `flarum`.

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

[](#installation)

Install with composer:

```
composer require luceos/minis:"*"
```

Updating
--------

[](#updating)

```
composer update luceos/minis:"*"
```

Extenders
---------

[](#extenders)

### How to use

[](#how-to-use)

> There's no need to enable this extension. Everything from this extension works "as is", as long as it's installed with composer.

Inside your `extend.php` in the Flarum installation path you will see some lines, at the bottom you will find something like:

```
return [

];
```

Between the `[` and `]` you can add the follow extender snippets. I've given examples for each of them.

### User - Email

[](#user---email)

`Luceos\Minis\User\Email\RequireDomain` - limits the email domains that can sign up.

```
  new Luceos\Minis\User\Email\RequireDomain('@flarum.org', '@gmail.com'),
```

### Post - Throttle

[](#post---throttle)

`Luceos\Minis\Post\Throttle\InTag` - throttles how fast a user can reply or create discussions in a certain tag

*Allow replying and creating discussions only once every five minutes in the tag with slug `advertisements`.*

```
  (new Luceos\Minis\Post\Throttle\InTag('advertisements'))
    ->op(true)
    ->reply(true)
    ->interval(fn (\Carbon\Carbon $carbon, \Flarum\User\User $user) => $carbon->subMinutes(5)),
```

Check the Carbon documentation in how to use the interval settings with carbon: .

*Allow creating discussions only once every day in the tag with slug `advertisements`.*

```
  (new Luceos\Minis\Post\Throttle\InTag('advertisements'))
    ->op(true)
    ->interval(fn (\Carbon\Carbon $carbon, \Flarum\User\User $user) => $carbon->subDay()),
```

### Post - Formatting

[](#post---formatting)

`Luceos\Minis\Post\Formatting\AllowElement` - allows using a html element in the editor/composer

```
  new Luceos\Minis\Post\Formatting\AllowElement('iframe'),
```

### Discussion - Http

[](#discussion---http)

`Luceos\Minis\Discussion\Http\Redirection` - allows redirecting requests to certain discussions

*Redirect any request to a path with words, dashes or numbers to be matched against a Discussion and redirected to it.*

```
  (new Luceos\Minis\Discussion\Http\Redirect(match: '~(?[\w\d-]{4,})~'))->fromSlug(),
```

**Note `fromSlug()` requires a capture group named `slug` in your regular expression!**

\_Redirect any request to a matched path to a specific path where we replace matches.

```
  (new Luceos\Minis\Discussion\Http\Redirect(match: '~wordpress\/([0-9]+)\/(.*)~', to: '$1/$2', status: 301)),
```

- `match` requires a valid regular expression, check an online regular expression tester on how to use regular expressions: .
- `to` optional argument to set a target for, you can use `$1` for the first matched capture group or use named capture groups as well

Links
-----

[](#links)

- [Packagist](https://packagist.org/packages/luceos/minis)
- [GitHub](https://github.com/luceos/flarum-ext-minis)
- [Discuss](https://discuss.flarum.org/d/35283)

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

683d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/504687?v=4)[Daniël Klabbers](/maintainers/Luceos)[@luceos](https://github.com/luceos)

---

Top Contributors

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

---

Tags

flarum

### Embed Badge

![Health badge](/badges/luceos-minis/health.svg)

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

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59120.6k13](/packages/fof-byobu)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1034.8k4](/packages/fof-discussion-language)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/gamification

Upvotes and downvotes for your Flarum community

4066.1k8](/packages/fof-gamification)[fof/best-answer

Mark a post as the best answer in a discussion

25154.0k20](/packages/fof-best-answer)

PHPackages © 2026

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