Using Laravel with the Platform.sh CLI
Notes
First, use the command platform create
to quickly create a new Platform.sh project. The command
will prompt you to configure the project for one of our regions with as much resources as you think you
might need. The project will be created in just a few seconds, and the CLI will provide a project ID you can
now use to interact with it.
You can then use the command platform environment:init
to initialize that project within any public GitHub
repository. Here, we are using our Laravel template, that already includes Platform.sh's three configuration files to deploy.
So long as the repository contains Platform.sh configuration files, it will then build and deploy the site. First, Platform.sh
will run through the build hook of the application's .platform.app.yaml
file, which defines its build process.
Once completed, Platform.sh will validate domains for the environment, and issue new Let's Encrypt certificates for them if not
present or if they will soon expire. Then the environment is created and deployed.
Once the project has finished initializing, use the command platform url
to view the new site, which will
open in a browser window.
Laravel has built and deployed on Platform.sh, and you're now ready to customize the site as you see fit.