When I generate the command "php composer.phar install" I get the following error:
{"error":{"type":"PDOException","message":"SQLSTATE[42000] [1044] Access denied for user ''@'localhost' to database 'database'","file":"/var/www/wingtech/wingadmin/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php","line":47}}Script php artisan optimize handling the post-install-cmd event returned with an error
http://oi42.tinypic.com/20uc2ma.jpg
Curiously, when I set up a database in app/config/database.php before running the install of the composer this error does not appear
To ease my php version is 5.4.17
And my composer.json is:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.0.*",
"orchestra/asset": "2.0.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/library",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"
}
Does anyone know what could be?