How to Connect a Database to Laravel
If you want your Laravel project to use a MySQL database, follow these steps:
First, create your database in ServerPilot and copy the database name, username, and password.
Finally, update the values for DB_DATABASE, DB_USERNAME, and DB_PASSWORD, replacing "homestead" and "secret" with your database credentials.
That's it! Now your Laravel app can access your MySQL database.