websight/l5-polyfaq
Composer 安装命令:
composer require websight/l5-polyfaq
包简介
Simple Laravel 5 FAQs for your site wired with polymorphic relations
README 文档
README
Installation
Install with composer.
composer require websight/l5-polyfaq
Add the ServiceProvider to your app/config/app.php
Websight\Polyfaq\PolyfaqServiceProvider::class,
Install the config.
php artisan vendor:publish --provider="Websight\Polyfaq\PolyfaqServiceProvider" --tag="config"
Install the migrations.
php artisan vendor:publish --provider="Websight\Polyfaq\PolyfaqServiceProvider" --tag="migrations"
Run the migrations.
php artisan migrate
Usage
There's basically three ways to use this package with your own model classes.
1. Include a trait
This is the easiest solution. Simply use the trait.
use Websight\Polyfaq\FaqTrait; class MyModel extends Model { use FaqTrait; }
That way, you can use $model->faqs to retrieve the collection of associated FAQs.
2. Make your own Polymorphic relation
If you don't like the field name faqs, you can also mix your own polymorphic relationship
class MyModel extends Model { /** * @return \Illuminate\Database\Eloquent\Relations\MorphMany */ public function coolfaqs() { return $this->morphMany('Websight\Polyfaq\Faq', 'faqable'); } }
That way, you would access them through $model->coolfaqs.
3. Use a many to many relationship
to be done
Customization
You can make this package your own.
Views
The views of this package are referenced via polyfaq:: prefix, described in the documentation.
If you need to override a template, you will need to place it in resources/views/vendor/polyfaq/$templatename.blade.php.
Language strings
The language files of this package are also referenced with the polyfaq:: prefix.
You can publish the translations as well, if you need to.
php artisan vendor:publish --provider="Websight\Polyfaq\PolyfaqServiceProvider" --tag="translations"
License
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
websight/l5-polyfaq 适用场景与选型建议
websight/l5-polyfaq 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 138 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 12 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「FAQ」 「laravel」 「laravel5」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 websight/l5-polyfaq 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 websight/l5-polyfaq 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 websight/l5-polyfaq 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Frequently Asked Questions (FAQ) plugin. With categories, on-the-fly search, customer helpfulness tracking and comments.
With Magento 2 FAQ Extension, you will not need to worry about creating useful and nice FAQ page for your ecommerce website. The extension will help you to set up nice informative & SEO-friendly magento 2 FAQ page. With faq page, your customers will find convenient, easily and quick to resolve commo
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Laravel helpers for dev
TYPO3 Questions - FAQ by coding.ms: Frequently asked questions (FAQ) for TYPO3 with SEO-optimized output, prepared schema.org microdata, markdown support for answers, shop-product integration, category and keyword filters, backend question management, CSV export, and improved AI visibility (GEO). Su
Send SMS and SMS Notification via Mailjet for Laravel
统计信息
- 总下载量: 138
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-16