php 如何在 Laravel 5 中创建包?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27661322/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How create package in Laravel 5?
提问by Marty Aghajanyan
php artisan workbench vendor/package --resources
command is not available in laravel 5, but how now create package in laravel 5 ?
命令在laravel 5 中不可用,但是现在如何在 laravel 5 中创建包?
采纳答案by Nicolas Beauvais
The laravel workbench has been renamed in laravel 5 to "Package Development" in the documentation
laravel 工作台已在 laravel 5 中重命名为文档中的“包开发”
http://laravel.com/docs/master/packages
http://laravel.com/docs/master/packages
Notice that there is no longer a workbench command and you need to create your own package structure, as the Laravel creator want to limit the dependency between created packages and the Laravel framework (#ref)
请注意,不再有工作台命令,您需要创建自己的包结构,因为 Laravel 创建者想要限制创建的包和 Laravel 框架之间的依赖关系 ( #ref)
UPDATE:Laravel 5 is now stable and the illuminate/workbench
package can be used in a laravel 5 application as I suggested in this post
更新:Laravel 5 现在稳定了,并且这个illuminate/workbench
包可以在 Laravel 5 应用程序中使用,正如我在这篇文章中所建议的
回答by tabacitu
Shameless self-promotion, but I've written a post about this called "Creating Laravel 5 packages for dummies" that explains how to create the package, how to put it on GitHub & Packagist and how to push changes/new versions afterwards.
无耻的自我推销,但我写了一篇关于这个的文章,名为“为傻瓜创建 Laravel 5 包”,解释了如何创建包,如何将它放在 GitHub 和 Packagist 上,以及如何在之后推送更改/新版本。
If you're already familiar with creating packages in Laravel 4, the fastest solution I've found was to use this CLI tool.
如果您已经熟悉在 Laravel 4 中创建包,我发现最快的解决方案是使用这个CLI 工具。