I've downloaded someones laravel-project and try to run it. There was also a '.sql'-file attached.
The '.env' -file was mentioned in the project's .gitignore-file, hence it wasn't included in the repository (which is the best practice, I recon). I copied this one into the project's root: https://github.com/laravel/laravel/blob/master/.env.example
I've configured the database-related section of this file like so:
- DB_CONNECTION=xampp
- DB_HOST=localhost
- DB_PORT=3306
- DB_DATABASE= my_own_db
- DB_USERNAME=root
- DB_PASSWORD=
(no password required)
I've run the command php artisan key:generate
to add the encryption key to the ".env"-file, and tried the following steps to run the app:
- I start the apache web server and mysql database using the xampp-manager (macOS)
- I run the app using the command
php artisan serve
The app itself loads, but it's empty since it doesn't read the data. However, phpMyAdmin shows that the database and it's data is readable at: http://localhost/phpmyadmin/sql.php?server=1&db= [my_own_db] [name of the table]
Here's a screenshot of the settings:
These are the db's privileges:
What am I doing wrong?