popphp/popphp-tutorial
最新稳定版本:4.0.4
Composer 安装命令:
composer require popphp/popphp-tutorial
包简介
Tutorial Application for Pop PHP Framework
README 文档
README
Overview
This is a basic tutorial application for the Pop PHP Framework to demonstrate how to wire up some simple routes for a web-facing application and a CLI-based application.
Install
Create a new project with it:
$ composer create-project popphp/popphp-tutorial project-folder
Or clone the repository and install it:
$ composer install
Once installed, the web access point is at public/index.php and the main
CLI access point is at script/pop
Permissions
You must change the permissions of the database folder and script/pop file
to writable in order for the application to fully work.
Basic Usage
Web
Start the web server by running:
$ ./kettle serve
And then access the web application at these address:
http://localhost:8000/
You should see the main home page with comment form at the bottom. You can submit a comment and see it added to the list of comments on the page.
Console
Setting the script/pop script to be executable, you can test the CLI
application like this:
$ ./script/pop help $ ./script/pop show $ ./script/pop delete
The first command shows the help screen; the second command shows any comments that have been posted; the third command allows you to select a post to delete.
Notes
- The tutorial application uses the
pop-dbcomponent to store the comments in a small SQLite database. - The tutorial application uses the
pop-formcomponent to create, render and validate the comment form. - The web application has a view folder,
app/view, that holds the view scripts for web page display. - The web application is utilizing the
pop-httpcomponent to leverage the HTTP request and response objects within the controller object. - The CLI application is utilizing the
pop-consolecomponent to leverage it for parsing the CLI requests and returning the appropriate responses to the CLI.
统计信息
- 总下载量: 373
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-11-03