Yii2 embed JS
Embed JS with IDE checking or intellisense, (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist mitrii/yii2-embedjs "*"
or add, (*4)
"mitrii/yii2-embedjs": "*"
to the require section of your composer.json
file., (*5)
Usage
Once the extension is installed, simply use it in your code by :, (*6)
<?php \mitrii\widgets\Embedjs::begin(); ?>
<script type="text/javascript">
console.log('Hello, world!');
</script>
<?php \mitrii\widgets\Embedjs::end(); ?>