nooriemad08 If you are in urgent need of this function, you can modify the core file, please note that after the core file is modified, the changes will be lost in the next update of the flarum, please make a backup of the original file.
Run the following command in the flarum installation directory:
sed -i '/discussion->slug/d' \
vendor/flarum/core/src/Api/Serializer/BasicDiscussionSerializer.php
sed -i -r 's#(discussion->id).*$#\1#' \
vendor/flarum/core/views/frontend/content/index.blade.php
sed -i '/idWithSlug =/s/\..*$/;/' \
vendor/flarum/core/src/Forum/Content/Discussion.php
sed -i 's#+(i.trim()?"-"+i:"")##' \
vendor/flarum/core/js/dist/forum.js
# Prevent amaurycarrade/flarum-ext-syndication from generating slug
sed -i "s# . '-' . \$discussion->attributes->slug##" \
vendor/amaurycarrade/flarum-ext-syndication/src/Controller/DiscussionFeedController.php \
vendor/amaurycarrade/flarum-ext-syndication/src/Controller/DiscussionsActivityFeedController.php
# Prevent fof/split from generating slug
sed -i 's#-{\$slug}##' \
vendor/fof/split/src/Posts/DiscussionSplitPost.php
sed -i 's#-{\$event->discussion->slug}##' \
vendor/fof/split/src/Listeners/UpdateSplitTitleAfterDiscussionWasRenamed.php
# Prevent flagrow/sitemap from generating slug
sed -i 's# . '-' . $discussion->slug##' \
vendor/flagrow/sitemap/src/SitemapGenerator.php
sed -i 's# . '-' . $page->slug##' \
vendor/flagrow/sitemap/src/SitemapGenerator.php