I'm just a beginner of laravel and when an trying to Work with models just that error pop up and the exact error message is :
PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)
Here is my route code :
route::get('customer', function(){
$customer = App\customer::find(1);
echo $customer->name;
});
and here is my .env file
APP_ENV=local
APP_KEY=base64:YP84cuDiwIkv4iCqrEEWMQBdOklL2+coODVf9qB6HwY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=my password
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null