Orbitum
Orbitum

Reputation: 1645

Laravel 3 bundles in 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!

Upvotes: 0

Views: 2755

Answers (1)

Alexandre Butynski
Alexandre Butynski

Reputation: 6746

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.

Upvotes: 3

Related Questions