A Laravel package providing a solid foundation for building discussion forums
riari/laravel-forum is a Laravel package for a laravel package providing a solid foundation for building discussion forums.
It currently has 653 GitHub stars and 100.208 downloads on Packagist (latest version 8.0.3).
Install it with composer require riari/laravel-forum.
Discover more Laravel packages by riari
or browse all Laravel packages to compare alternatives.
Last updated

Complete documentation is available on teamteatime.net.
| Laravel version | Livewire version * | Package version | PHP version | |---------------------|-------------------------|---------------------|-----------------| | 13 | 4 | ^8.0 | ^8.3 | | 12 | 3 | ^7.0 | ^8.2 |
* Only applicable if you intend to use a Livewire-based UI preset.
Please note that older package versions not listed above are no longer maintained or supported.
See the support policy in the Laravel docs for more information about Laravel release versions, their supported PHP versions, and how long they receive bug & security fixes.
Install the package via composer:
composer require riari/laravel-forum:^8.0
Package Discovery should take care of registering the service provider automatically, but if you need to do so manually, add the service provider to your bootstrap/providers.php:
TeamTeaTime\Forum\ForumServiceProvider::class,
Run the vendor:publish command to publish the package config, translations and migrations to your app's directories:
php artisan vendor:publish
Run your migrations:
php artisan migrate
A forum:preset-install {name} command is available for installing UI presets. Run forum:preset-list to see a list of available presets. You must install one of these to publish the corresponding views to your application. For example:
php artisan forum:preset-install livewire-tailwind
[!NOTE]
By default, thelivewire-tailwindpreset is set as the active one in theforum.frontend.presetconfig value. This preset requires Livewire and a few other dependencies. Refer to UI Presets for details.
Several configuration files are published to config/forum. Refer to these for a variety of options for changing the behaviour of the forum and how it integrates with key parts of your application code.
[!NOTE]
You may need to modify theforum.integration.user_nameconfig option according to your user model. This specifies which attribute on the user model should be used as a display name in the forum views.
Laravel Forum currently supports 15 languages: German, English, Spanish, French, Italian, Dutch, Romanian, Russian, Thai, Turkish, Serbian, Portuguese (Brazil), Swedish, Chinese, and Indonesian. The translation files are published to resources/lang/vendor/forum/{locale}.
[!NOTE]
Some new language strings have been introduced in version 6 but not yet translated; PRs to translate these would be greatly appreciated.
If you wish to contribute, an easy way to set up the package for local development is Team-Tea-Time/laravel-studio, which is set up to load a local working copy of this repository (see the readme for usage details).
Bring up the MySQL service:
docker-compose up -d mysql
Install Composer dependencies:
docker-compose run --rm composer install
Run the phpunit container to execute tests:
docker-compose run --rm phpunit
The package tables can be seeded with sample categories, threads, posts, and a user via forum:seed:
docker-compose exec php-fpm php artisan forum:seed