最近朋友有个小要求,刚好有时间,正准备研究一下tp5。听说tp5已经标准化了,就更傻了。所以我做了一个这个论坛的小demo,开源出来玩玩,改天做了两个模板。说实话,TP5模型层和数据库层真的很好用EnvDockerdocker环境大家一定不陌生:Redis3.1+PHP5.6-fpm+Nginx+Mysql5.7项目地址https://github.com/zhaojunlik...演示站点http://blog.oeynet.orgUsage1.gitclonehttps://github.com/zhaojunlik...client101vbbs2.docker-composeup--build-d第一次需要手动导入test数据导入默认测试数据$dockernetworkls$dockerrun-it--linkmysql-db:mysql--networkclient101vbbs_default-v`pwd`/data/backup:/data/backup:ro--rmmysql:5.7sh-c'execmysql-h"mysql"-P"3306"-uroot-p"zhaojun"oeynet_client_bbs<./data/backup/oeynet_client_bbs.sql'DockerContainerscomposer临时容器,安装composerpackagebower临时容器,安装前端package,下面是nmp环境无非是nginxphp-fpmmysql-dbredis项目依赖添加验证码直接修改TPhttps://github.com/zhaojunlik...辅助类https://github.com/zhaojunlik...Bower{"name":"101-bbs-front","version":"1.0.0","keywords":["101vBBs"],"main":"app.js","dependencies":{"jquery":"^3.2.1","vue":"^2.3.4","bootstrap":"^3.3.7","requirejs":"^2.3.3","require-css":"^0.1.10","axios":"^0.16.2","layer":"^3.0.3","wangEditor":"^3.0.3","animate.css":"^3.5.2"}}Composer{"name":"oeynet/simple-bbs","description":"newsimplebbs","type":"project","keywords":["bbs","forum","project"],"homepage":"http://bbs.oeynet.com/","license":"Apache-2.0","authors":[{"name":"zhaojunlike","email":"zhaojunlike@gmail.com"}],"require":{"php":">=5.4.0","topthink/framework":"^5.0.6","topthink/think-captcha":"^1.0","topthink/think-testing":"^1.0","bluem/tree":"^1.5","oeynet/helper":"^0.1","oeynet/add-captcha":"^0.2.0","voku/anti-xss":"^2.1"},"autoload":{"psr-4":{"tests\\":"tests"},"files":[]},"extra":{"think-path":"thinkphp"},"config":{"preferred-install":"dist"},"repositories":{"packagist":{"type":"composer","url":"https://packagist.phpcomposer.com"}}}Tp5踩过的坑1.模型关联2.模型验证,控制器验证3.动态属性4.view层的case(我以为view层对应controller的case是标准化的,最后view是全部小写,否则会在linux部署报错)Demo演示截图首页首页我的附件内容管理用户管理和小黑屋系统统计和配置RBAC权限用户组
