Do you need to make changes to your .env to deploy your application
Im trying to deploy my application on an apache server. it is connecting to the database but I wanted to know if I needed to alter my .env file or run a command (like php artisan serve) or if thats only when using it locally.
currently Im getting 404 errors and my endpoints wont work, although my local version is working.
You don't need to run php artisan serve, because your server you should "serve" your application now. php artisan serve is only for local development ;)
You should of course update your .env file for your server based on the credentials for example the database or the APP_ENV.
If you get a 404 you might have an error in your application or something is wrong with the settings of apache
APP_NAME=NameOfYourApp (this is used in emails and other things, so your company name?)
APP_ENV=production
APP_DEBUG=false
APP_URL=http://youractualsite.com/
and run php artisan key:generate so it will create a new APP_KEY
of course all of your db credentials, email credentials, etc., need to match the production server, as well as everything else that your project uses