What is Laravel?
Laravel is a modern web application framework developed written in PHP. Their is a very active community that supports Laravel, resulting in large plug-in library to choose from.
21YunBox provides a very simple Laravel deployment method. You can quickly and easily deploy with 21YunBox in a static webpage environment.
How to Deploy PHP Laravel in China?
- Register as a 21YunBox member
- Create a PostgreSQL database
- Fork Laravel example on Gitee
- Create a Cloud Service on the 21YunBox, and allow the 21YunBox to access your code base
- Configure the following settings
Environment
PHP 7.2
Build command:
./build.sh
Start command:
php artisan serve --host=0.0.0.0 --port 10000
Click Advanced Configuration to configure environment variables:
KEY | VALUE |
---|---|
APP_ENV | production |
DB_CONNECTION | pgsql |
DATABASE_URL | In the first step to create a cloud database midpoint Database URL get |
APP_KEY | Paste the key generated by php artisan key:generate --show
|
If you'd like a step by step example, please refer to the video below:
How to deploy the Laravel project to the server
Why Choose 21YunBox?
21YunBox is a Cloud Service Platform based out of Beijing, China. Our services provides you with an easy and budget friendly, end-to-end web platform deployment service for all applications and stacks. No matter your need, we have a flexible solution to assist.
If needed, we also offer full support in obtaining your ICP license which allows you to legally host online content within Mainland China.
To learn about the differences between 21YunBox and these foreign (outside of China) cloud service platforms, please refer to:
- 21YunBox vs Heroku
- 21YunBox vs Netlify
- 21YunBox vs Vercel
- 21YunBox vs Gatsby Cloud
- 21YunBox vs Github Pages
- 21YunBox vs Surge.sh
- Compare in terms of function and price: 21YunBox vs Heroku, Netlify, Vercel
This article's content originated here
For additional detail and future modifications, refer the original post.
Top comments (0)