1. Go to this page and download the library: Download houdunwang/route library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace app\home\controller;
class Entry{
public function show($id,$cid){
echo "访问是 $id,$cid";
}
}
namespace app\home\controller;
class Entry{
public function getIndex(){
echo 'index';
}
public function getAdd(){
echo 'add';
}
public function postEdit(){
echo 'edit';
}
public function putUpdate(){
echo 'update';
}
public function deleteRemove(){
echo 'delete';
}
}
namespace app\home\controller;
class Photo{
//GET /photo 索引
public function index(){
echo 'index';
}
//GET /photo/create 创建界面
public function create(){
echo 'create';
}
//POST /photo 保存新增数据
public function store(){
echo 'store';
}
//GET /photo/{photo} 显示文章
public function show($id){
echo 'show';
}
//GET /photo/{photo}/edit 更新界面
public function edit($id){
echo 'edit';
}
//PUT /photo/{photo} 更新数据
public function update($id){
echo 'update';
}
//DELETE /photo/{photo} 删除
public function destroy($id){
echo 'destroy';
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.