riari / laravel-forum
A Laravel 6/7/8/9 package providing a solid foundation for building discussion forums
Installs: 61 669
Dependents: 3
Suggesters: 0
Security: 0
Stars: 536
Watchers: 32
Forks: 153
Open Issues: 5
Requires
- php: ^8.1
- doctrine/dbal: ^3.5
- kalnoy/nestedset: ^6.0
- laravel/framework: ^10.0
Requires (Dev)
- orchestra/testbench: ^8.0
- 5.6.0
- 5.5.0
- 5.4.3
- 5.4.2
- 5.4.1
- 5.4.0
- 5.3.8
- 5.3.7
- 5.3.6
- 5.3.5
- 5.3.4
- 5.3.3
- 5.3.2
- 5.3.1
- 5.3.0
- 5.2.5
- 5.2.4
- 5.2.3
- 5.2.2
- 5.2.1
- 5.2.0
- 5.1.1
- 5.1.0
- 5.0.x-dev
- 5.0.10
- 5.0.9
- 5.0.8
- 5.0.7
- 5.0.6
- 5.0.5
- 5.0.4
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 5.0.0-rc.3
- 5.0.0-rc.2
- 5.0.0-rc.1
- 4.2.0
- 4.1.5
- 4.1.4
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.x-dev
- 4.0.2
- 4.0.1
- 4.0.0
- 3.1.9
- 3.1.8
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.x-dev
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0-RC6
- 3.0.0-RC5
- 3.0.0-RC4
- 3.0.0-RC3
- 3.0.0-RC2
- 3.0.0-RC1
- 2.5.0
- 2.4.9
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.9
- 2.3.8
- 2.2.7
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.0
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
- dev-laravel-5
- dev-laravel-4
This package is auto-updated.
Last update: 2023-09-06 20:50:17 UTC
README
Complete documentation is available on teamteatime.net.
Versions
Laravel version | Package version | PHP version |
---|---|---|
10 | ^5.5 | ^8.1 |
9 | ^5.3 | ^8.0 |
6 - 8 | ^5.0 | ^7.4 |
5 | ^4.0 | ^7.4 |
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.
Installation
Step 1: Install the package
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,
Step 2: Publish the package files
Run the vendor:publish command to publish the package config, translations and migrations to your app's directories:
php artisan vendor:publish
Step 3: Update your database
Run your migrations:
php artisan migrate
Step 4: Install a UI preset
As of 5.6.0, a forum:install
command is available for installing UI presets. The available preset options are bootstrap
(for a Bootstrap 5 UI) and tailwind
(for a Tailwind CSS UI). You must install one of these to publish the corresponding views to your application. For example:
php artisan forum:install tailwind
Additional steps
Configuration
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.
Translations
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}
. Some new language strings have been introduced in 5.0 but not yet translated; PRs to translate these would be greatly appreciated.
Development
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).
Running tests
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
Seeding
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