The extension has been generated successfully. To enable it in your application, you need to create a git repository and require it via composer.
cd D:\data\www\yiiadmin\backend\runtime\tmp-extensions/yii2-app-admin
git init
git add -A
git commit
git remote add origin path.to/your/repo
git push -u origin master The next step is just for initial development, skip it if you directly publish the extension on packagist.org Add the newly created repo to your composer.json.
"repositories":[
{
"type": "git",
"url": "https://path.to/your/repo"
}
] Note: You may use the url file://D:\data\www\yiiadmin\backend\runtime\tmp-extensions/yii2-app-admin for testing. Require the package with composer
composer.phar require okfish/yii2-app-admin:dev-master And use it in your application.
\okfish\admin\AutoloadExample::widget(); When you have finished development register your extension at packagist.org. ————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。