riari/laravel-forum
riari/laravel-forum is a complete forum package for Laravel, providing categories, threads, posts, moderation, authorization, and customizable Blade views. Add threaded discussions to your application with configurable models, routes, and UI.
riari/laravel-forum has distinct major lines with different Laravel/PHP constraints and namespaces. Check the release you are installing against your app’s Laravel and PHP versions before writing any integration code. On an older app you may need the older branch; on a newer app confirm the package supports it rather than assuming.composer require riari/laravel-forum
php artisan vendor:publish --provider="Riari\Forum\ForumServiceProvider"
php artisan migrate
If the provider publishes multiple groups, publish them deliberately: config, migrations, views, language files, and assets. Read the publish output rather than accepting everything blindly.config/forum.php first. This is the control panel for integration: the user model, route prefix/name/middleware, pagination, validation, search, attachments, and view/layout settings. Most “the forum doesn’t fit my app” problems are solved here or by overriding views, not by editing vendor code.User model. Point forum.integration.user_model at your application user class and add whatever contract/trait the installed version requires. Ensure the attributes the forum expects for an author display name exist; if your column is name and the package expects username, add an accessor rather than duplicating data.php artisan route:list --path=forum, open the configured prefix (usually /forum), and confirm the package routes are registered and reachable. Check whether they are public by default; most apps want at least write actions behind auth.resources/views/vendor/forum are the intended customization point. Replace the package layout with your app shell, keep the package partials and route names intact, and override only what you need. Run php artisan view:clear after changes.Gate::before returning true for admins and null otherwise so normal policy checks still run for everyone else.auth to the whole route group. Either use policy checks for writes and keep reads public, or take over route registration in your app and group the package controllers’ write routes behind auth.forum.category.show, forum.thread.show, etc., depending on version). If you change the route prefix or name, those helpers keep your app consistent.RefreshDatabase, and write policy tests around actingAs. Seed categories explicitly in tests rather than relying on published seeders.author_id. If your users table uses UUIDs or ULIDs, inspect and adjust the forum migrations before running them. Fixing this after data exists is painful.vendor:publish --force will replace edited views/config. Keep customizations in version control and diff before forcing. Prefer publishing only the specific tag you need.config/forum.php is cached in production. Run php artisan config:clear and php artisan config:cache as appropriate. Route changes require route:clear; view changes require view:clear.Gate::before returns null for non-admins. Returning false from before denies everything.web only. Decide explicitly whether unauthenticated users can create threads or replies, and enforce it in both middleware and policy.{!! !!} rendering just to make formatting work.withTrashed deliberately in admin views; otherwise counts and audit screens will disagree.php artisan storage:link; otherwise downloads 404 even though uploads appear to succeed. Check file size and MIME validation in config/forum.php.public/vendor/forum (or the equivalent for your version). Do not assume vendor:publish handled assets if you used a narrow tag.composer update and make upgrades opaque.How can I help you explore Laravel packages today?