Get expert guidance in a few days with a Laravel code review

Laravel Forum

riari/laravel-forum image

Laravel Forum stats

Downloads
61.9K
Stars
537
Open Issues
4
Forks
154

View on GitHub →

A Laravel 6/7/8/9 package providing a solid foundation for building discussion forums

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
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Riari Laravel Forum Related Articles

Add Reactions Functionality to Your App With Laravel Reactions image

Add Reactions Functionality to Your App With Laravel Reactions

Read article
Process Markdown Securely with Laravel's inlineMarkdown Method image

Process Markdown Securely with Laravel's inlineMarkdown Method

Read article
The Best Laravel Tutorials and Resources for Developers image

The Best Laravel Tutorials and Resources for Developers

Read article
Laravel Forums Package: Waterhole image

Laravel Forums Package: Waterhole

Read article
ArchTech Forum — A Laravel community for advanced developers image

ArchTech Forum — A Laravel community for advanced developers

Read article
Presenting Laravel Country Logomarks image

Presenting Laravel Country Logomarks

Read article
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $3200/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud