-
-
Notifications
You must be signed in to change notification settings - Fork 6
Quick start
PHP.Gt relies on Composer as the installation medium. Using Composer ensures you have the correct versions of PHP and extensions installed.
Read the Introduction to Composer article for more information.
With Composer installed, run composer global require phpgt/cli to install the command line interface (CLI) for PHP.Gt. This will make the gt command available to your terminal, which includes the helper commands required for creating new projects and running them.
For the
gtcommand to be available globally, ensure that your~/.composer/vendor/bindirectory is in yourPATH(or on Windows,C:\%HOMEPATH%\AppData\Roaming\Composer\vendor\bin).
Continue reading about the PHP.Gt Command Line.
To start a new project, use the gt create command. Syntax for this command is gt create DIRECTORY [--blueprint BLUEPRINT] [--namespace NAMESPACE]. The create command will create a new project in the directory specified, and use the optionally supplied blueprint name to base the project from. Specifying no blueprint will create an empty WebEngine application.
For example: gt create MyBlog --blueprint blog will create a new WebEngine application within the MyBlog directory, based off of the blog blueprint. A list of blueprints is available here: https://php.gt/blueprints .
Read more about Blueprints.
When you have a project created, the gt run command runs a local server available at http://localhost:8080 by default. The run command concurrently runs gt serve and gt build, which are necessary for serving your application locally and building any client-side assets such as SCSS.
Learn more about how PHP.Gt handles client side files.
- Request-response lifecycle
- Running your application
- Project layout
- Application architecture
- Web servers
- URIs
- Page view
- Dynamic URIs and pages
- Headers and footers
- Page logic
- Protected globals
- User input
- Cookies
- Sessions
- DOM manipulation
- Custom HTML components
- DOM templates
- Binding data to the DOM
- Database
- Client side assets
- API Webservices
- Security
- Configuration
- Build system
- Coding styleguide