-
-
Notifications
You must be signed in to change notification settings - Fork 5
Quick start
PHP.Gt relies on Composer is 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.
- File-based routing
- Page views
- Page logic
- Dynamic URIs
- Headers and footers
- Custom HTML components
- Page partials
- Binding data to the DOM
- DOM manipulation
- Hello You tutorial
- Todo list tutorial
- Address book tutorial WIP
- Blueprints
- Application architecture
- Coding styleguide WIP
- PHP environment setup WIP
- Web servers WIP
- Background cron tasks
- Database setup WIP
- Client-side compilation WIP
- Testing WebEngine applications WIP
- Production checklist WIP
- Security WIP