Yii2 support module with ticket system
Yii2 support module with ticket system, (*1)
NOTE: Module is in initial development. Anything may change at any time.
v.0.1, (*2)
Installation
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist nikitakls/yii2-support-ticket "*"
or add, (*5)
"nikitakls/yii2-support-ticket": "*"
to the require section of your composer.json
file., (*6)
Usage
Once the extension is installed, simply use it in your code by :, (*7)
yii migrate/up -p=@nikitakls/support/migrations
Restrict and split frontend and backend applications
Add module in config file application for frontend:, (*8)
'modules' => [
'class' => \nikitakls\support\Support::class,
'support' => 'nikitakls\support\Support',
'layout' => '@frontend/views/layouts/profile',
'guestLayout' => '@frontend/views/layouts/main',
'isBackend' => false,
'supportEmail' => 'support@example.com',
'sendEmailToSupport' => true,
'sendEmailToUser' => true,
'uploadBehavior' => [
'filePath' => '@filePath/origin/support/[[attribute_ticket_id]]/[[pk]].[[extension]]',
'fileUrl' => '@fileUrl/origin/support/[[attribute_ticket_id]]/[[pk]].[[extension]]',
]
],
You can get access to module via url:
http://application.url/support/default - for users
http://application.url/support/contact - for guest, (*9)
Add module in config file application for backend:, (*10)
'modules' => [
...
'isBackend' => true,
],