PHP code example of luceos / minis

1. Go to this page and download the library: Download luceos/minis library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

luceos / minis example snippets


return [

];

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

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

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

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

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

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