Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 1.96 KB

getting-started.md

File metadata and controls

68 lines (51 loc) · 1.96 KB

Getting started with Yii2-ticket-support

Yii2-ticket-support is designed to work out of the box for yii2-advanced-template. It means that installation requires minimal steps. Only one configuration step should be taken and you are ready to have user management on your Yii2 website.

1. Download

Yii2-ticket-support can be installed using composer. Run following command to download and install Yii2-ticket-support:

composer require akiraz2/Yii2-ticket-support "dev-master"

2. Configure

Add following lines to your main configuration file:

'modules' => [
    'support' => [
        'class' => 'akiraz2\support\Module',
        'userModel' => 'common\models\User',
        'yii2basictemplate' => false,
        'adminMatchCallback' => false,//false - for frontend, true - for backend
        'hashGenerator' => null,//user function for generation unique id for ticket or null for standart generator (The ticket id will be something like this: lkLHOoIho)
    ],
],

3. Update database schema

The last thing you need to do is updating your database schema by applying the migrations. Make sure that you have properly configured db application component and run the following command:

Module uses namespaced migrations, so change it in console\config\main.php:

return [
    'id' => 'app-console',
    
    'controllerMap' => [        
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationPath' => null,
            'migrationNamespaces' => [
                //'console\migrations',                
                'akiraz2\support\migrations'
            ],
        ],
    ],
$ php yii migrate

Where do I go now?

You have Yii2-ticket-support installed. Now you can check out the list of articles for more information.

Troubleshooting

If you're having troubles with Yii2-ticket-support, make sure to check out the troubleshooting guide.