在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
ssfSimple swoole framework install
Runphp index.php Nginx configserver { ... location / { try_files $uri /sw_proxy_pass; } location /sw_proxy_pass { proxy_http_version 1.1; proxy_set_header Connection "keep-alive"; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://127.0.0.1:9501$request_uri; } ...} Database: Query BuilderModel的 mtb 和 tb 属性都是 Illuminate\Database\Eloquent\Builder 实例, 不同的是mtb是使用主库,tb可能查询的从库 查询数据 $result = $this->mtb->where('id', $id)->limit(1)->get()->toArray(); 直接运行SQL(使用db属性的select等方法) $result = $this->db->select("select * from user where id = 1 limit 1"); 插入数据可以使用 $newId = $this->iInsert([ 'name' => 123,]); update数据 $affected = $this->mtb->where('id', 1)->update([ 'name' => '哈哈',]); Model命名说明 参考数据库 laravel database语法参考 https://laravel.com/docs/5.8/database 模板引擎 twig语法参考 https://twig.symfony.com/doc/2.x 使用交流群号码:21890295 |
请发表评论