定制 taskforcedev/laravel-forum 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

taskforcedev/laravel-forum

Composer 安装命令:

composer create-project taskforcedev/laravel-forum

包简介

A forum module for Laravel 5 websites.

关键字:

README 文档

README

A drop-in forum module for Laravel 5.

Code Style: Build Status Scrutinizer Code Quality

Integration Testing:

Laravel 5.3: Build Status

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)

  • Database Tables

    • 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:

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

Laravel 5.3+:

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).

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

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:

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.

'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

/admin/forums

Once you have done this you can add the link to /forum into your sites navigation as you please.

Administration / Moderation

In order to provide administrators access to add/edit/manage the forums we use laravel policies.

The following must return true for a user to be able to visit the admin section:

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

We recommended you have a policy which proves a user has administration powers on your application:

see: https://laravel.com/docs/5.3/authorization#creating-policies

Then you can add the following to your app/Providers/AuthServiceProvider.php file

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

Then apply your admin policy to each of the models [example:]

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.

Events

The following events are fired within the package and can be listened for in your main application.

  • 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.

Future versions will use the laravel major and minor version numbers followed by release number.

taskforcedev/laravel-forum 适用场景与选型建议

taskforcedev/laravel-forum 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 676 次下载、GitHub Stars 达 6, 最近一次更新时间为 2015 年 06 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「forum」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 taskforcedev/laravel-forum 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 taskforcedev/laravel-forum 我们能提供哪些服务?
定制开发 / 二次开发

基于 taskforcedev/laravel-forum 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 676
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 4
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-06-06