I have uploaded my website in cPanel but still don't know how to change my .env file or database.php to connect my site to the database. The connection works on localhost without any error but what do I need to change in these file when I move my project from localhost to an online host?
I created my database in cPanel -> phpmyadmin and created a user which has a password, my user is a Privileged Users for this database.
How can I connect my project on the host with my database?
My .env file looks as follows:
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://domain_name
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=databasename
DB_USERNAME=username
DB_PASSWORD=password
localhostas database host.