Install from composer
composer require lyrasoft/faq
Then copy files to project
php windwalker pkg:install lyrasoft/faq -t routes -t lang -t migrations -t seeders
Seeders
- Add
faq-seeder.php
toresources/seeders/main.php
- Add
faq
type tocategory-seeder.php
Languages
If you don't want to copy language files, remove -t lang
from install command.
Then add this line to admin & front middleware:
$this->lang->loadAllFromVendor('lyrasoft/faq', 'ini');
Edit resources/menu/admin/sidemenu.menu.php
// Category
$menu->link('常見問題分類')
->to($nav->to('category_list', ['type' => 'faq']))
->icon('fal fa-sitemap');
// Portfolio
$menu->link('常見問題管理')
->to($nav->to('faq_list'))
->icon('fal fa-question');