Laravel 5.1 some tutorial.

Posted July 18, 2015 6.2k views
UbuntuMySQLPHP Frameworks

Hello, i am new in Laravel and in DigitalOcean too :)
I create droplet, install Vesta and after install Laravel 5.1
I have several questions:
1) How i must config database connect to my vesta mysql params.
2) I need .env file and in config/database.php use ‘host’ => env() or i must use 'host’ => 'localhost’ (or my ip of the sever) i as this because i install laravel debug panel and i get this errors
Cannot add listen to Queries for Laravel Debugbar: SQLSTATE[28000] [1045] Access denied for user 'homestead’@'localhost’ (using password: YES)
SQLSTATE[28000] [1045] Access denied for user 'homestead’@'localhost’ (using password: YES)

i not use homestead, i dont`know what is this. i think its like xamp(lamp/wamp) i use my droplet.
3) Laravel has something like YII gii or CakePHP (code generator from database with relationships) ?
In the terminal i try use command
php artisan make:model User
php artisan make:migration createuserstable
php artisan make:migration addvotestouserstable –table=users

php artisan make:migration createuserstable –create=users
in terminal all succesfully and i see new models, controllers, but in my database - not.

What i want - i want use PHPSTORM 9 and create, edit files and upload to server.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

It is finding the database, but denying access for the homestead user.

Homestead is a Vagrant box containing the full Laravel development environment aiming to make it simple to get everything up and running locally. As the Laravel database docs mention, by default the .env file is configured for using Homestead:

By default, Laravel’s sample environment configuration is ready to use with Laravel Homestead, which is a convenient virtual machine for doing Laravel development on your local machine. Of course, you are free to modify this configuration as needed for your local database.

In your .env file, you need to specify the username, password, and database as well as your host.