diff --git a/docs/VueJsIntegration.md b/docs/VueJsIntegration.md new file mode 100644 index 0000000..73d1b86 --- /dev/null +++ b/docs/VueJsIntegration.md @@ -0,0 +1,53 @@ +# Vue.js Integration in Yii2 + +## Plugin application integration + +Add 'antkaz/yii2-vue' plugin to your ``composer.json`` file : +```bash +composer require antkaz/yii2-vue --ignore-platform-reqs +``` + +## View file integration + +Add this following code at the beginning of php view files : +```php +use antkaz\vue\VueAsset; +VueAsset::register($this); +``` +Now you can add Vue.js (v2) applications and components inside of your php view files. + +## Running example + +Add this code to your view file to test if Vue.js is working well. + +Example : +```html +
{{ message }}
+ +