Skip to content
Greg Bowler edited this page Jan 3, 2019 · 14 revisions

Install

For alternative installation instructions, see the installation page.

PHP.Gt relies on Composer as the installation medium. Using Composer ensures you have the correct versions of PHP and extensions installed.

With Composer installed, run composer global require phpgt/installer to globally install the interface required for creating new WebEngine applications. 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 gt command to be available globally, ensure that your ~/.composer/vendor/bin directory is in your PATH (or on Windows, C:\%HOMEPATH%\AppData\Roaming\Composer\vendor\bin).

See [[adding gt to your PATH]] for more information.

Continue reading about the gt commands.

Create new project

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.

Run your project

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.

Read more in the running your application section.

Clone this wiki locally