2017 © Pedro Peláez
 

project laravel-forum

A forum module for Laravel 5 websites.

image

taskforcedev/laravel-forum

A forum module for Laravel 5 websites.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Laravel Forum

A drop-in forum module for Laravel 5., (*1)

Code Style: Build Status Scrutinizer Code Quality, (*2)

Integration Testing:, (*3)

Laravel 5.3: Build Status, (*4)

Requirements

  • Laravel 5.2+
  • jQuery is currently required for forum moderation features (lock/sticky).

What this package provides

  • Fully Functional Forum (/forum)
  • Admin Interface (/admin/forums), (*5)

  • Database Tables, (*6)

    • forums
    • forum_posts
    • forum_categories
    • forum_post_replies

Installation

Step 1: Add the following package to your composer.json require (if not already present).

Laravel 5.2:, (*7)

require {
  "taskforcedev/laravel-forum": "1.0.2"
}

Laravel 5.3+:, (*8)

require {
    "taskforcedev/laravel-forum": "dev-master"
}

In development (steps for 5.0-5.2 may work as long as you dont require a package requiring the newer laravel-support package)., (*9)

Step 2: Run composer update

composer update

Step 3: Add the following service provider(s) to config/app.php (if not already present)

'providers' => [
    Taskforcedev\LaravelSupport\ServiceProvider::class,
    Taskforcedev\LaravelForum\ServiceProvider::class,
]

Step 4: Migrate

Run the migrations, (*10)

php artisan migrate

Step 5: Publish Config.

If you haven't previously published the config from the LaravelSupport package please do this also with the following command:, (*11)

php artisan vendor:publish --tag="taskforce-support"

Step 6: Edit config.

If you haven't previously edited the config/taskforce-support.php file please add your sites details into this., (*12)

'layout' => 'layouts.master',
'sitename' => 'Your Site Name',

Usage

Once you have done the installation steps above in order to setup the forums for public use you must first create at least one category and a forum, you do this by visiting, (*13)

/admin/forums

Once you have done this you can add the link to /forum into your sites navigation as you please., (*14)

Administration / Moderation

In order to provide administrators access to add/edit/manage the forums we use laravel policies., (*15)

The following must return true for a user to be able to visit the admin section:, (*16)

$user->can('create', Forum::class);

We recommended you have a policy which proves a user has administration powers on your application:, (*17)

see: https://laravel.com/docs/5.3/authorization#creating-policies, (*18)

Then you can add the following to your app/Providers/AuthServiceProvider.php file, (*19)

use Taskforcedev\LaravelForum\Models\Forum;
use Taskforcedev\LaravelForum\Models\ForumCategory;

Then apply your admin policy to each of the models [example:], (*20)

protected $policies = [
    ...

    Forum::class => AdminPolicy::class,
    ForumCategory::class => AdminPolicy::class,
];

As it stands any authenticated user is able to post or reply in any forum., (*21)

Events

The following events are fired within the package and can be listened for in your main application., (*22)

  • Taskforcedev\LaravelForum\Events\PostCreated
  • Taskforcedev\LaravelForum\Events\PostReply

Contributing / Feedback

  • We welcome any pull requests, please ensure code is to the PSR-2 Standard.
  • We check github issues frequently so please feel free to raise any comments or feedback there.

Versioning

Version 1.* follows the semantic version numbering system., (*23)

Future versions will use the laravel major and minor version numbers followed by release number., (*24)

The Versions

30/12 2016

dev-master

9999999-dev

A forum module for Laravel 5 websites.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

laravel forum

28/12 2016

v1.0.2

1.0.2.0

A forum module for Laravel 5 websites.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

laravel forum

17/12 2015

v1.0.1

1.0.1.0

A forum module for Laravel 5 websites.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

laravel forum

14/08 2015

v1.0.0

1.0.0.0

A forum module for Laravel 5 websites.

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

laravel forum