Module for adding the legal agreements across dashboard
composer require black-lamp/yii2-legal-agreement
or add
"black-lamp/yii2-legal-agreement": "1.*.*"
to the require section of your composer.json.
yii migrate --migrationPath=@vendor/black-lamp/yii2-legal-agreement/common/migrations
Frontend module for displaying and accepting the agreement
'modules' => [
// ...
'legal' => [
'class' => bl\legalAgreement\frontend\LegalModule::className(),
],
]
Backend module for work with the agreements
'modules' => [
// ...
'legal' => [
'class' => bl\legalAgreement\backend\LegalModule::className(),
'languageProvider' => [
'class' => bl\legalAgreement\backend\providers\DbLanguageProvider::className(),
'arModel' => \bl\multilang\entities\Language::className(),
'idField' => 'id',
'nameField' => 'name'
]
],
]
Component for work with agreements and users
'components' =>
[
// ...
'legal' => [
'class' => bl\legalAgreement\common\components\LegalAgreement::className()
],
]