Callback form server for yii2
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist it-yakutia/yii2-callback "*"
or add
"it-yakutia/yii2-callback": "*"
to the require section of your composer.json
file.
Add migration path in your console config file:
'controllerMap' => [
...
'migrate' => [
...
'migrationPath' => [
...
'@vendor/it-yakutia/yii2-callback/src/migrations',
],
],
]
Once the extension is installed, simply use it in your code by :
<?= Url::toRoute(['/callback/back/index']); ?>
Add RBAC roles:
callback
For front use views params templates:
<?php
return [
// ...
'custom_view_for_modules' => [
// ...
'callback_front' => [
'create' => '@frontend/themes/basic/views/callback/create',
'_form' => '@frontend/themes/basic/views/callback/_form',
'thanks' => '@frontend/themes/basic/views/callback/thanks'
]
],
];
And add link:
<?= Url::toRoute(['/callback/front/create']); ?>