pistej/yii2-faq

Simple Yii2 FAQ extension

Installs: 14

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 1

Type:yii2-extension

0.1.0 2019-01-26 10:34 UTC

This package is auto-updated.

Last update: 2024-04-26 21:56:53 UTC


README

Simple Yii2 FAQ extension - show help text based on visited application URL and application language.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist pistej/yii2-faq "~0.1"

or add

"pistej/yii2-faq": "~0.1"

to the require section of your composer.json file.

To run database migrations, simply call:

php yii migrate/up --migrationPath=vendor/pistej/yii2-faq/migrations/

Usage

You should add module to your config:

'modules' => [
    ...
    'faq' => [
        'class' => 'pistej\faq\Faq',
    ],
],

To display FAQ CRUD (administration pages) just go to URL:
example.com/faq/qa/index
example.com/faq/group/index Actions are allowed for authenticated users only.

Once the extension is installed, simply use it in your code or layout by:

<?= \pistej\faq\widgets\FaqWidget\FaqWidget::widget(); ?>

Translations

To add new language, (clone repository, install composer) add new language code into message/config.php file

'languages' => ['sk', 'pl'],

and run yii command to extract messages from root folder

php vendor/bin/yii message messages/config.php 

translate newly created messages and create PR.