Thanks to visit codestin.com
Credit goes to github.com

Skip to content

wdmg/yii2-tickets

Repository files navigation

Progress Github all releases GitHub version Progress GitHub license

Yii2 Tickets Module

Ticket system for Yii2

Requirements

Installation

To install the module, run the following command in the console:

$ composer require "wdmg/yii2-tickets"

After configure db connection, run the following command in the console:

$ php yii tickets/init

And select the operation you want to perform:

  1. Apply all module migrations
  2. Revert all module migrations

Migrations

In any case, you can execute the migration and create the initial data, run the following command in the console:

$ php yii migrate --migrationPath=@vendor/wdmg/yii2-tickets/migrations

Configure

To add a module to the project, add the following data in your configuration file:

'modules' => [
    ...
    'tickets' => [
        'class' => 'wdmg\tickets\Module',
        'routePrefix' => 'admin'
    ],
    ...
],

If you have connected the module not via a composer add Bootstrap section:

$config['bootstrap'][] = 'wdmg\tickets\Bootstrap';

Routing

Use the Module::dashboardNavItems() method of the module to generate a navigation items list for NavBar, like this:

<?php
    echo Nav::widget([
    'options' => ['class' => 'navbar-nav navbar-right'],
        'label' => 'Modules',
        'items' => [
            Yii::$app->getModule('tickets')->dashboardNavItems(),
            ...
        ]
    ]);
?>

Status and version [in progress development]

  • v.1.1.0 - Added module name and description, translations. Routing fix.
  • v.1.0.7 - Fixing route rules, added WYSIWYG editor

Packages

No packages published

Languages