PHP code example of liufencn / flarum-short-slug

1. Go to this page and download the library: Download liufencn/flarum-short-slug 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/ */

    

liufencn / flarum-short-slug example snippets

bash
php flarum extension:enable liufencn-short-slug
bash
php flarum short-slug:clear
bash
# Set a custom slug -> /d/12-release-notes
php flarum short-slug:set 12 release-notes

# Go back to the short form
php flarum short-slug:set 12