Hey everyone!
Yesterday was the day of testing the deployment of the app and how it works on live server. I've uploaded the app through cPanel and I'm using Postgre as a database. What I did so far:
-
Upload the files inside public_html.
-
Edit .env and .env.example with things like APP_URL, database information etc...
-
Opened the terminal through cPanel.
-
Run php artisan migrate, which actually caused an error for old version of PHP, because we installed the newest composer which was released 6 days ago that requires minimum version of PHP 8.
-
Changed the PHP version to 8.
-
Tried to run php artisan migrate again which caused an error could not find driver ....
Image of the error: https://imgur.com/a/Zq20WUx
But now I'm stuck. What should I do? What actually means this error?
The server has MySQL Databases and PostgreSQL databases installed. I defined in the .env files the following:
DB_CONNECTION=pgsql
DB_HOST=localhost
Is that actually correct? Should localhost actually work? Which file should I actually edit - .env or .env.example or both?
Also what should I do to run the app generally? php artisan serve is for local development, right? When I open the website URL right now I see a Index of / page with the files.
Also, currently the app is in subdomain of the main domain. Can this cause any problems?
Thanks in advance!
Previous thread: https://laracasts.com/discuss/channels/laravel/i-need-some-tips-on-how-to-move-on-with-the-app-im-building?page=1&replyId=767709