Complete documentation is available on teamteatime.net.
NOTE: Version 3.0 is no longer supported. If you're using a version of Laravel below 5.3, consider upgrading it!
- PHP 5.4 or above
- Laravel 5.3 or above
Install the package via composer:
composer require riari/laravel-forum:~4.0
Then add the service provider to your config/app.php
:
Riari\Forum\ForumServiceProvider::class,
Installing the standard front-end is recommended:
composer require riari/laravel-forum-frontend:~1.0
Riari\Forum\Frontend\ForumFrontendServiceProvider::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
If you installed Xdebug before version 2.3, you may need to modify xdebug.max_nesting_level
. The suggested and new default value from version 2.3 onwards is 256
.
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 11 languages: German, English, Spanish, French, Italian, Romanian, Russian, Turkish, Serbian, Portuguese (Brazil) and Swedish. The translation files are published to resources/lang/vendor/forum/{locale}
. Please be aware that much of the translation work in 3.0 has been done using Google Translate and probably isn't accurate. Pull requests are welcome to rectify this.
Permissions in 3.0 are handled via the Authorization features introduced in Laravel 5.1.11. Refer to src/Policies for a full list of policies. To override methods in a policy, just create a class extension for it somewhere in your application and change the corresponding namespace specified in the forum.integration.policies
config array. You'll likely want to do this for the ForumPolicy and CategoryPolicy as a minimum to prevent your regular users from managing categories and threads!