elvainch elvainch - 2 years ago 604
PHP Question

Install dependency (doctrine/dbal) on composer laravel

So I am new in the laravel world. I am trying to execute a migration to rename some columns and I got an exception.

As i read on the documentation i have to add the doctrine/dbal dependency to my composer.json file. How do i do that? Which is the correct composer.json file. I have many in my application. Is the one that is on the same level as the folders app,bootstrap, public and vendor.

If so how do I add that dependency. Do i have to download anything?

By the way im using easyphp, not wamp!

Edit 1

After doing that the console throws this error


Answer Source

To add this dependency open the composer.json at the root of your project (in the same level as app, public etc.) and in the require section add the doctrine/dbal package like:

"require": {
    "laravel/framework": "4.1.*",
    "doctrine/dbal": "v2.4.2"

Save the file and run composer update


You probably installed git with the default settings and it's not in your PATH env.

Open Git Bash (it was installed with git - you will find it in your programs) and do composer update. By the way it's far better that windows command prompt.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download