A slim, lean forum package designed for quick and easy integration in Laravel projects

Related tags

CMS php laravel php7 forum
Overview

Tests phpcs StyleCI Packagist Downloads Packagist License

Laravel Forum Logo

Complete documentation is available on teamteatime.net.

Installation

Requires Laravel 6+ and PHP 7.4+.

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

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 13 languages: German, English, Spanish, French, Italian, Dutch, Romanian, Russian, Thai, Turkish, Serbian, Portuguese (Brazil) and Swedish. 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 DB can be seeded with sample categories, threads, posts, and a user via ForumSeeder:

docker-compose exec php-fpm php artisan db:seed --class=TeamTeaTime\\Forum\\Database\\Seeds\\ForumSeeder
Comments
  • Massive query count on forum index

    Massive query count on forum index

    I'm just getting to grips with the codebase at the moment, and have written a set of importers to import our current forum from phpBB.

    We have about 2000 threads and 20,000 posts - I have successfully imported our users separately, and then populated forum_categories, forum_threads and forum_posts and everything appears to be working the only issue at the moment is the massive number of queries that occurs on the forum index.

    I am currently getting 4082 queries on forum index, which is 9 categories (under 3 title categories) - which seems way too much.

    Taking a look at laravel debugbar I am seeing this - http://i.imgur.com/SCw1DSa.png

    It repeats alternating between querying users and forum_posts for the majority of the 4000 queries.

    So, two questions I suppose;

    • Is there another table I should be populating with additional information? I thought perhaps threads read might be the issue, perhaps?
    • Any ideas what else could be causing this? Have you tested the forums with a large amount of threads and posts?

    Cheers

    opened by unbolt 30
  • How to re-doing category links to subdomain form?

    How to re-doing category links to subdomain form?

    Hi! Now category format in url represent as like "https://forum.site/category/thread/post". How use subdomains with names equal category, like "https://category.forum.site/thread/post" for all content? I see you have a complex routing system, I would like to use something like:

    Route::group(['domain' => '{subdomain}.forum.site'], function () {

    in router file like /vendor/riari/laravel-forum/routes.php

    Also, how publish it to it not changing if I update package?

    type: question 
    opened by NDanilov2015 20
  • Array to String Conversion Error Present via PHP 7

    Array to String Conversion Error Present via PHP 7

    this is what i currently see when upgrading to PHP7 Image

    Specifically it has to deal with this line:

    $this->collections[$model] = $this->$map_model_repos[$model]->getByID($id, $with);
    

    would you have any idea on how to fix this?

    opened by Teranode 15
  • Invalid argument supplied for foreach() (View: /var/www/html/resources/views/vendor/forum/category/index.blade.php)

    Invalid argument supplied for foreach() (View: /var/www/html/resources/views/vendor/forum/category/index.blade.php)

    i followed bellow instructions

    1.composer require riari/laravel-forum:~3.0

    2.Then add the service provider to your config/app.php: Riari\Forum\ForumServiceProvider::class,

    3.composer require riari/laravel-forum-frontend:~1.0 Riari\Forum\Frontend\ForumFrontendServiceProvider::class,

    4.php artisan vendor:publish

    5.php artisan migrate

    6.then click on mydomaiin.com/forum

    i got a this error

    Invalid argument supplied for foreach() (View: /var/www/html/resources/views/vendor/forum/category/index.blade.php)

    in Category_controller you guys are mention columns name 'category_id ' but in db table only 'id ' column there .any reason for that ?

    opened by LakshmanKatragadda 14
  • [Feature] Thread moving & title editing

    [Feature] Thread moving & title editing

    Can you add the ability to move threads to different categories and Edit thread titles cause sometimes someone makes a mistake and there isnt a way to edit the title besides the db)

    opened by Teranode 13
  • 404 | NOT FOUND

    404 | NOT FOUND

    Hello Rick.

    The short story: I'm having issues with your system when integrated with Wave SAAS (https://github.com/thedevdojo/wave). Would you be able to help?

    A bit more info: Devdojo is kindly working with me quite some time after I integrated laravel-forum. But it's getting kind of difficult now since seems that any possible solution might be done at laravel-forum. Here is the post related to this issue: https://devdojo.com/question/404-not-found

    Would you be able to do the same effort? I mean, install their software and then your package. If you kindly be able to do so, then here is my installation process:

    1. Install Wave SAAS
    • https://wave.devdojo.com/docs/installation
    • If you get redis error, try composer update --ignore-platform-req=ext-redis
    • If you get migration error copy the below code at config/database php, Ln: 60 (mysql engine) --> 'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
    1. Proof that Wave Blog works before laravel-forum.
    • Visit: Wave Blog link, click any article. You should be able to read any article. Meaning, that there no error.
    1. Install laravel-forum 5.0 --> You might want to ignore redis if you had trouble before. --> composer require riari/laravel-forum:~5.0 --ignore-platform-req=ext-redis

    2. Re-visit Wave Blog Page and click any article. You should get an 404 | NOT FOUND error.

    Thank you in advance

    opened by CyberEkklesiaOwner 11
  • added support for paging via API methods

    added support for paging via API methods

    Hi, I’ve noticed that paging doesn’t work on API methods (not implemented). I’ve added support to enable paging on the API calls (thread, categories, posts). Only category list is not perfect - there is a filter which removes private categories after the query is done. The paginate will return data, but the total count is not accurate (based on the private settings).

    We can disable paging for categories by setting 0.

    To enable paging set true in the config: forum.preferences.pagination.enabled

    opened by pionl 11
  • How to add forum routes to 'web' route groups to avoid errors

    How to add forum routes to 'web' route groups to avoid errors

    i have succeeded in integrating laravel and forum but one thing is left, the web guard middleware enbles session in laravel 5.2, so when i run /forum i get this errors:

    ErrorException in 6829460faf86e4b23bc8a19c8baa92dc4b035c9e.php line 7: Undefined variable: errors (View: C:\wamp\www\agron\resources\views\vendor\forum\partials\alerts.blade.php) (View: C:\wamp\www\agron\resources\views\vendor\forum\partials\alerts.blade.php) (View: C:\wamp\www\agron\resources\views\vendor\forum\partials\alerts.blade.php)

    opened by jerryOkafor 11
  • Can't get the permission working

    Can't get the permission working

    Hello, thanks for the amazing work!

    I've finally managed to get it working, but there's one problem that I can't seem to solve after reading documents and articles online, which is to use policy to permit certain action.

    What I wanna do is just like the demo, different user has their own permission, however no matter how I configure the code it's always allowed any users to do something only the admin should be able to do.

    I have been searching for the policy code, but can't find it, I was wondering if you could help~

    opened by Edan0615 10
  • Need help overriding Controllers

    Need help overriding Controllers

    I'm trying to override the create and store method in the Thread Controller. I extended it, and made a create method, but it doesn't work. The reason for this is because i disabled the integrated permissions and would like to use my own and the one you have is directly in the controller file.

    opened by Teranode 10
  • Missing required parameter for [Route: forum.thread.show]

    Missing required parameter for [Route: forum.thread.show]

    Missing required parameter for [Route: forum.thread.show] [URI: forum/t/{thread}-{thread_slug}] [Missing parameter: thread_slug].

    Hello, it's me again it's kinda werid that it works fine on my localhost, but when I uploaded it onto my server and when I tried to test it, I accidently leave content as blank, and it gave me the above message.

    and when I am typing this here, I figure I might as well just delete the post from the DB, and when I went in there I found five or six same posts, and when delete them it's back and works fine.

    I was wondering if this could cause any problem since user tend to make this kind of mistake.

    opened by Edan0615 9
  • Accepted post

    Accepted post

    The package should support an optional 'accepted post' feature, whereby a post can be marked as accepted by a user who has permission (by default, the thread author) to do so. This can be useful for Q&A categories, but could have other use cases.

    type: feature 
    opened by Riari 0
  • Feature flags

    Feature flags

    The package should support optional feeatures via a feature flagging system. Initially, the API and web routes could be enabled/disabled via this system.

    type: feature 
    opened by Riari 0
  • Content read/write pipelines

    Content read/write pipelines

    The package should have configurable and overridable pipelines for transforming post content before it's written to or after it's read from the database. This will make integration of WYSIWYGs much easier.

    By default, it should provide a pipeline for Markdown support.

    More details in https://github.com/Team-Tea-Time/laravel-forum/issues/275.

    type: feature 
    opened by Riari 0
  • UI Presets

    UI Presets

    The package should be able to provide multiple presets, similar to how Laravel UI works. Initially, it should support Bootstrap and Tailwind presets.

    • It should support UIs that consume the API using Vue (either as an SPA or using Inertia, or possibly both).
    • It should retain the option to publish a specific UI to the application directory for easier overriding.
    • It will require changes to config to support more than one UI, as well as UIs that use the API routes instead of web routes.
    type: feature 
    opened by Riari 0
Releases(5.4.2)
  • 5.4.2(Nov 27, 2022)

    • Fix undefined variable error in Web/PostController (7491dac970ffdc65edaa56ea47869adfaed7dc0d)
    • Fix null post in Web/PostController (347acb61647b6b97ef4b9e46d2586b3311d923ca)

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.4.1...5.4.2

    Source code(tar.gz)
    Source code(zip)
  • 5.4.1(Nov 19, 2022)

  • 5.4.0(Nov 13, 2022)

    What's Changed

    • Allow custom resource classes by @puzzledmonkey in https://github.com/Team-Tea-Time/laravel-forum/pull/331

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.3.8...5.4.0

    Source code(tar.gz)
    Source code(zip)
  • 5.3.8(Nov 2, 2022)

    What's Changed

    • Add support for auth_middleware to API to match web functionality by @puzzledmonkey in https://github.com/Team-Tea-Time/laravel-forum/pull/328

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.3.7...5.3.8

    Source code(tar.gz)
    Source code(zip)
  • 5.3.7(Oct 24, 2022)

    What's Changed

    • API routing fixes and return type fixes for PHP 8.1 by @puzzledmonkey in https://github.com/Team-Tea-Time/laravel-forum/pull/326

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.3.6...5.3.7

    Source code(tar.gz)
    Source code(zip)
  • 5.3.6(Oct 24, 2022)

    What's Changed

    • Update ResolveApiParameters.php by @puzzledmonkey in https://github.com/Team-Tea-Time/laravel-forum/pull/325

    New Contributors

    • @puzzledmonkey made their first contribution in https://github.com/Team-Tea-Time/laravel-forum/pull/325

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.3.5...5.3.6

    Source code(tar.gz)
    Source code(zip)
  • 5.3.5(Oct 15, 2022)

    What's Changed

    • Replace route model bindings with a middleware-based alternative by @Riari in https://github.com/Team-Tea-Time/laravel-forum/pull/322

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.3.4...5.3.5

    Source code(tar.gz)
    Source code(zip)
  • 5.3.4(Oct 13, 2022)

    What's Changed

    • Move route model binding outside of route groups by @Riari in https://github.com/Team-Tea-Time/laravel-forum/pull/320

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.3.3...5.3.4

    Source code(tar.gz)
    Source code(zip)
  • 5.3.3(Sep 24, 2022)

    What's Changed

    • Fix Delete Thread action by @Riari in https://github.com/Team-Tea-Time/laravel-forum/pull/313

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.3.2...5.3.3

    Source code(tar.gz)
    Source code(zip)
  • 5.3.2(Jun 16, 2022)

    What's Changed

    • Fixing Error On Category API & Add Indonesian Translation [api] by @aldok10 in https://github.com/Team-Tea-Time/laravel-forum/pull/307

    New Contributors

    • @aldok10 made their first contribution in https://github.com/Team-Tea-Time/laravel-forum/pull/307

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.3.1...5.3.2

    Source code(tar.gz)
    Source code(zip)
  • 5.3.1(Jun 10, 2022)

    What's Changed

    • Updated browser tab title to include thread title by @Fot0n in https://github.com/Team-Tea-Time/laravel-forum/pull/305
    • Updated route registration and route load from service provider by @pr4u4t in https://github.com/Team-Tea-Time/laravel-forum/pull/306
    • Updated title slug generation to fall back to a basic string when an empty one is generated

    New Contributors

    • @Fot0n made their first contribution in https://github.com/Team-Tea-Time/laravel-forum/pull/305
    • @pr4u4t made their first contribution in https://github.com/Team-Tea-Time/laravel-forum/pull/306

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.3.0...5.3.1

    Source code(tar.gz)
    Source code(zip)
  • 5.3.0(Mar 6, 2022)

  • 5.2.5(Feb 10, 2022)

  • 5.2.3(Feb 6, 2022)

    What's Changed

    • Improved eager loading for thread listings by @Riari in https://github.com/Team-Tea-Time/laravel-forum/pull/301
    • Fixed a few minor issues in the frontend

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.2.2...5.2.3

    Source code(tar.gz)
    Source code(zip)
  • 5.2.2(Jan 15, 2022)

    What's Changed

    • Fix some unhandled client-side errors by @Riari in https://github.com/Team-Tea-Time/laravel-forum/pull/295
    • Fix stat changes when moving threads by @Riari in https://github.com/Team-Tea-Time/laravel-forum/pull/296
    • Use Bootstrap 4 pagination view by @Riari in https://github.com/Team-Tea-Time/laravel-forum/pull/297

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.2.1...5.2.2

    Source code(tar.gz)
    Source code(zip)
  • 5.2.1(Dec 11, 2021)

    What's Changed

    • Implement forum:seed command by @Riari in https://github.com/Team-Tea-Time/laravel-forum/pull/287
    • Fix permanent bulk deletion of threads by @Riari in https://github.com/Team-Tea-Time/laravel-forum/pull/288

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.2.0...5.2.1

    Source code(tar.gz)
    Source code(zip)
  • 5.2.0(Nov 21, 2021)

  • 5.1.1(Nov 18, 2021)

  • 5.1.0(Nov 18, 2021)

    What's Changed

    See PRs for detailed changelogs.

    • Cascading privacy: https://github.com/Team-Tea-Time/laravel-forum/pull/279
    • Update doctrine/dbal: https://github.com/Team-Tea-Time/laravel-forum/pull/280
    • Fix inconsistencies in category and thread ability checks: https://github.com/Team-Tea-Time/laravel-forum/pull/282

    Misc Changes

    • Updated the doctrine/dbal dependency to include 3.1.4 onwards.

    Full Changelog: https://github.com/Team-Tea-Time/laravel-forum/compare/5.0.10...5.1.0

    Source code(tar.gz)
    Source code(zip)
  • 5.0.10(Oct 3, 2021)

  • 5.0.9(Oct 3, 2021)

  • 5.0.8(Sep 1, 2021)

    • Updated NL translations (#269).
    • Fixed some issues related to the ForumSeeder seeder.
    • Fixed some minor layout/style issues in the thread.show view.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.7(Aug 12, 2021)

    • Updated the category.partials.list view:
      • "Re: [thread]" now only displays if there's more than one post in the thread.
      • Subcategory row content is now center-aligned to match top-level category rows.
    • Fixed an issue with the "Recent" and "Updated & unread" thread views that was causing threads in categories inaccessible to the current user to be included in the list.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.6(Aug 9, 2021)

    • Updated the default master.blade.php to specify Vue version to use.
    • Fixed an issue in the default master.blade.php that was preventing navbar dropdowns on small displays from working.
    • Improved consistency in Gate/Policy checks for deleting and restoring posts and threads.
    • Updated and simplified Policy defaults.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.5(Aug 5, 2021)

  • 5.0.4(Aug 5, 2021)

  • 5.0.3(Aug 4, 2021)

  • 5.0.2(Aug 4, 2021)

  • 5.0.1(Aug 4, 2021)

  • 5.0.0(Aug 4, 2021)

A quick-and-dirty implementation based on Drupal 9

Help2022 - powered by Drupal 9 / Docksal This is a quick-and-dirty implementation based on Drupal 9 - full running version see here

Help2022.com 2 Mar 5, 2022
Quick intro to Laravel using a custom CMS app I made

Quick intro to Laravel using a custom CMS app I made This is mainly to show an example of a small CMS being built in Laravel. CMS (Content Management

Alfred Nutile 0 Jun 2, 2014
Simple forum software for building great communities.

About Flarum Flarum is a delightfully simple discussion platform for your website. It's fast and easy to use, with all the features you need to run a

Flarum 13.6k Jan 1, 2023
PHPDish is a powerful forum system written in PHP. It is based on the Symfony PHP Framework.

PHPDish 是一个基于Symfony框架开发的内容社区系统;得益于大量的前端以及后端的第三方类库的使用使得PHPDish有着高质量的代码,敏捷实现; 你可以使用composer或者直接下载本仓库进行程序的安装,注意切换到tag。 PHPDish 开发手册以及详细安装文档 Requirements

PHPDISH 227 Dec 8, 2022
PHPDish is a powerful forum system written in PHP. It is based on the Symfony PHP Framework.

PHPDish 是一个基于Symfony框架开发的内容社区系统;得益于大量的前端以及后端的第三方类库的使用使得PHPDish有着高质量的代码,敏捷实现; 你可以使用composer或者直接下载本仓库进行程序的安装,注意切换到tag。

PHPDISH 227 Dec 8, 2022
CMS for laravel projects

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Nelson  Mutane 1 Nov 2, 2021
Borgert - A simple CMS to start projects in Laravel containing some modules

A simple CMS to start projects in Laravel containing some modules.Blog, Pages, Products, Mailbox, Image Gallery, Log Viewer and Users.

Borgert Inc. 300 Dec 30, 2022
A .phpstorm.meta.php file for TYPO3 projects

.phpstorm.meta.php for TYPO3 This repository contains a .phpstorm.meta.php file which can be used to ease the work with TYPO3 projects in phpstorm. TY

Alexander Schnitzler 20 Dec 2, 2022
Simple personal website with your Github projects.

Setup Install dependencies: composer install npm install Copy .env.example file to .env: cp .env.example .env Generate application key: php artisan ke

Antonio Sarosi 15 Nov 23, 2022
Laravel-modulator - Laravel Modulator (HMVC) creating and handling in an easy and simple way.

Laravel Modulator HMVC creating and handling in an easy and simple way. Documentation You can find the detailed documentation here in Laravel Modulato

Pharaonic 7 Aug 7, 2022
True Multisite, Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

True Multisite, Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

null 4 Oct 28, 2022
Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS

Grav Grav is a Fast, Simple, and Flexible, file-based Web-platform. There is Zero installation required. Just extract the ZIP archive, and you are alr

Grav 13.6k Jan 4, 2023
Plugin for Craft CMS that makes it easy to interact with the Instagram Basic Display API and Instagram oEmbed.

Instagram Basic Display plugin for Craft CMS 3.x This plugin creates endpoints in your Craft install for you to consume the Instagram Basic Display AP

Jonathan Melville 5 Dec 20, 2022
SoyCMS Trivial - Lightweight and easy-to-use CMS. ( the custom version based on soycms. )

SoyCMS Trivial Author arbk (https://aruo.net/) Licensed under the GPLv2 license Version 3.1.3-t0 DESCRIPTION SoyCMS Trivial is an open source web cont

arbk 1 Oct 18, 2021
Twill GraphQL provides easy access to query-specific fields from Twill CMS modules and user-defined modules with GraphQL

Twill CMS GraphQL ?? WIP - not stable Twill GraphQL provides easy access to query-specific fields from Twill CMS modules and user-defined modules with

Izet Mulalic 8 Dec 6, 2022
FlatPress is a lightweight, easy-to-set-up flat-file blogging engine.

[flatpress.org] [Support forum] [Wiki] [GitHub] [Mastodon] [Twitter] [Changelog] [Contributors] Welcome to FlatPress! FlatPress is a lightweight, easy

FlatPress 143 Dec 22, 2022
YesWiki is a wiki system written in PHP, including extensions making collaboration more simple (databases, maps, easy editing, bootstrap themes,...).

YesWiki YesWiki is a Free Software under the AGPL licence, made for creating and managing your website, in a collaborative way. YesWiki allows any web

YesWiki 84 Dec 26, 2022
PHP based, easy to use blog cms.

v0.1 Bagita is an easy-to-use blog based on Php. It helps you to manage and extend your own blog system completely without any difficulties. Roadmap v

Michael S 7 Apr 8, 2022
Fork is an easy to use open source CMS using Symfony Components.

Installation Make sure you have composer installed. Run composer create-project forkcms/forkcms . in your document root. Browse to your website Follow

Fork CMS 1.1k Dec 8, 2022