dtufl26404 2013-05-02 16:05
浏览 42
已采纳

Laravel 3捆绑在Laravel 4中

In L3 there was great thing - packages. They could have own routes and worked as plugins and made software more modular. How to achieve this in L4? I see packages little different from bundles.

Thank You!

  • 写回答

1条回答 默认 最新

  • dougaopu7938 2013-05-02 16:48
    关注

    Bundle is a specific packaging for Laravel 3, great to add easily a package but not a standard.

    Laravel 4 is more modular because it accepts packages form all the php community. It uses a standard as package manager, Composer, and Laravel 4 is managed itself as a package.

    You just have to create a composer.json file like this one :

    {
        "require": {
            "laravel/framework": "4.0.*"
        },
        "require-dev": {
            "phpunit/phpunit": "3.7.*",
            "mockery/mockery": "dev-master@dev",
            "sebastian/phpcpd": "1.4.*"
        }
    }
    

    And execute composer update. All the dependencies of your project will be installed in accordance with the versions you specify in this file. It's really the best pattern to manage a lot of libraries for a team.

    Bundles and packages are really similar, the gift wrap and the shipping way change but that's all.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法