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.
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"
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)
],
],
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
You have Yii2-ticket-support installed. Now you can check out the list of articles for more information.
If you're having troubles with Yii2-ticket-support, make sure to check out the troubleshooting guide.