Complete documentation is available on teamteatime.net.
Requires Laravel 6+ and PHP 7.4+.
Install the package via composer:
composer require riari/laravel-forum:~5.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 config/app.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
Several configuration files are published to your application's config directory, each prefixed with 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.
You may need to modify the
forum.integration.user_name
config 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 14 languages: German, English, Spanish, French, Italian, Dutch, Romanian, Russian, Thai, Turkish, Serbian, Portuguese (Brazil), Swedish, and Chinese. The translation files are published to resources/lang/vendor/forum/{locale}
. Some new language strings have been introduced in 5.0 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