wangta69/laravel-board
Composer 安装命令:
composer require wangta69/laravel-board
包简介
BBS bulletin board system
README 文档
README
A Korean-style Bulletin Board System (BBS) package for Laravel.
한국형 계층형 게시판(BBS)을 라라벨에서 쉽고 빠르게 구축하기 위한 패키지입니다.
💡 Overview
This library is designed to implement the hierarchical board structure (List, View, Write, Reply, Comment) commonly used in Korea within the Laravel environment. It supports Bootstrap 5 by default.
이 라이브러리는 길라(Gilra) (Online Fortune Service)의 커뮤니티 및 공지사항 기능을 구축하는 데 실제로 사용되었습니다.
- Demo: Live Demo Link
- Official Docs: Documentation
🚀 Features
- Korean Style BBS: Hierarchical posts (Reply), Comments, Secret posts.
- Admin Panel: Built-in controller and views for board management.
- Thumbnails: Real-time thumbnail generator helper.
- Widgets: Latest posts widget helper.
- Comments Component: Easily add comment functionality to any model.
📦 Installation
Requirements
- PHP >= 7.4
- Laravel >= 8.x (Tested on 8.x ~ 11.x)
- Bootstrap 5.x
- jQuery 3.6.x
1. Require the package via Composer
composer require wangta69/laravel-board
2. Install Assets & Config
Run the installation command to publish assets and migration files.
php artisan pondol:install-bbs
🛠 Configuration & Usage
1. Admin Security Setup
After installation, you should secure the Admin Controller.
Go to App/Http/Controllers/Bbs/Admin/BbsController.php (or similar admin controllers) and set up the middleware or permission check in the __construct method.
public function __construct() { $this->middleware('auth'); // Example: Check for administrator role // if (!Auth::user()->hasRole('administrator')) { // abort(403, 'Unauthorized action.'); // } }
2. Create a Board
- Access the admin panel:
http://YourDomain/bbs/admin - Create a new board configuration (e.g., table name:
notice). - (Optional) If you need a role management system:
php artisan make:model Role -m
3. Access the Board
- Admin URL:
http://YourDomain/bbs/admin/tbl/{table_name} - User URL:
http://YourDomain/bbs/{table_name}
🎨 Helpers & Components
Real-time Thumbnail
Generate thumbnails on the fly.
<!-- usage: bbs_get_thumb($image_path, $width, $height) --> <img src="{{ bbs_get_thumb($article->image, 205, 205) }}" alt="{{ $article->title }}" />
Latest Posts Widget
Display the latest posts from a specific board.
public function index() { // usage: bbs_get_latest(['table' => 'table_name', 'cnt' => count]) $notices = bbs_get_latest(['table' => 'notice', 'cnt' => 5]); return view('welcome', compact('notices')); }
Forum (Comment) Component
You can attach a comment section to any arbitrary model or page, not just the BBS.
<x-item-comments item="story" :itemId="$story->id" skin="default" />
- skin: Skin name (currently 'default' is available).
- item: Target category or model name (string).
- itemId: Unique ID of the target content.
📂 Customization
To customize the templates, look into the resources/views/bbs/templates directory. You can duplicate an existing template and modify it to create your own skin.
🛠 SEO & Meta Data Customization
Laravel Board supports dynamic meta data management through Pondol\Meta. You can customize how meta titles, descriptions, and images are generated for each board by implementing a custom Resolver.
1. Create a Custom Meta Resolver
Create a class in your app (e.g., App\Services\BbsMetaResolver.php) that implements Pondol\Bbs\Contracts\BbsMetaResolver.
namespace App\Services; use Pondol\Bbs\Contracts\BbsMetaResolver; use Illuminate\Support\Str; class MyBbsMetaResolver implements BbsMetaResolver { /** * @param \Pondol\Meta\Meta $meta * @param string $type 'index' or 'show' * @param object $cfg Board Configuration (BbsTables) * @param object|null $article Article Data (BbsArticles) */ public function resolve($meta, $type, $cfg, $article = null) { // Custom logic for specific boards if ($cfg->table_name === 'notice') { $meta->title("[Notice] " . ($article ? $article->title : $cfg->name)); } // Custom image logic for detailed view if ($type === 'show' && $article) { $description = Str::limit(strip_tags($article->content), 160); $meta->description($description); if ($article->image) { $meta->image(\Storage::url($article->image)); } } return $meta; } }
2. Register the Resolver
Bind your custom class to the interface in App\Providers\AppServiceProvider.php.
public function register() { $this->app->bind( \Pondol\Bbs\Contracts\BbsMetaResolver::class, \App\Services\MyBbsMetaResolver::class ); }
By doing this, you can fully control the SEO strategy for each board without modifying the package core.
📜 License
The MIT License (MIT). Please see License File for more information.
wangta69/laravel-board 适用场景与选型建议
wangta69/laravel-board 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 74 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 10 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「board」 「bbs」 「pondol」 「�」 「시�」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wangta69/laravel-board 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wangta69/laravel-board 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wangta69/laravel-board 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova package that adds a notification feed in your Nova app.
IPBoard API integration with Laravel
Cross-platform general-purpose multiple content forms social network service software.
A Laravel Nova package that adds a notification feed in your Nova app.
Board bundle
Alfabank REST API integration
统计信息
- 总下载量: 74
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 26
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-15