Install dependency (doctrine/dbal) on composer laravel

If you are getting error while running migration try this

composer require doctrine/dbal:2.*

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

Edit

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.


1) To install dependency , run this command

composer require doctrine/dbal

2) For 'git' is not recognized error, either you don't have git installed or the PATH is not added in the environment variables.

Install git for windows.