@TAN KE JING , Just checking in to see if the previous post helped answer your question or point you in the right direction.
As Lex Li mentioned, if you wish to host your WebApp on an Azure Virtual Machine, where you have more control of the infrastructure. Typically, you will setup and configure, the same way, as you would on-prem.
As for as hosting on Azure App Service, is not compatible with local XAMPP database. You could create an Azure SQL database.
To connect your Laravel project to the Azure SQL database, you need to configure the database connection in your Laravel project.
You can follow the steps in the tutorial :
"Tutorial: Deploy a PHP (Laravel) app with Azure Database for MySQL - Flexible Server on Azure App Service" to connect your Laravel project to the Azure SQL database.
In the repository root, create a file named .env. Copy the following variables into the .env file. Replace the <root_password> placeholder with the MySQL root user's password.
https://learn.microsoft.com/azure/mysql/flexible-server/tutorial-php-database-app
For more info DB config:
If you’re connecting to an external database update the database related values under config/database.php
accordingly. For example, if using mysql
as your database make sure to update these values and add any environment variables being used as App Settings in the Azure Portal.
Laravel Deployment on App Service Linux