Mysql 分页优化

4-14 2,060 views

在系统中需要进行分页的时候,我们通常会使用limit 加上偏移量的方法实现,再加上合适的order by 子句,如果有对应的索引,通常效率会很不错,否则mysql需要...
阅读全文 0

lcobucci/jwt —— 一个轻松生成jwt token的插件

4-09 11,903 views

github: https://github.com/lcobucci/jwt/tree/3.4 1.安装 "lcobucci/jwt": "^3.4"版本 php >= 5.6 OpenSSL Extension // 安装 $ ...
阅读全文 2

laravel/lumen —— API 插件 dingo/api

4-08 2,417 views

文档:https://github.com/dingo/api/wiki/Installation 1.安装 #PHP ^7.1 (However soon to be PHP 7.2) composer require dingo/api #LARAVEL php artisa...
阅读全文 0

guzzle —— Guzzle是一个PHP的HTTP客户端,轻松搞定get、post、分流上传下载大文件、http cookies等等

4-07 3,770 views

官方文档:https://guzzle-cn.readthedocs.io/zh_CN/latest/index.html github: https://github.com/guzzle/guzzle 安装 composer require guzzlehttp/guzz...
阅读全文 0

lumen 自定义接口返回成功失败数据格式

4-07 3,425 views

我的lumen版本,5.8 1.找到 app/Http/Controllers/Controller.php 修改成如下代码: <?php namespace App\Http\Controllers; use Laravel\Lumen\Routi...
阅读全文 0

Failed to clear cache. Make sure you have the appropriate permissions.

4-06 4,358 views

php artisan cache:clear 出现 Failed to clear cache. Make sure you have the appropriate permissions 您最近是否从以前的Laravel版本升级了?该Failed to...
阅读全文 0

一个好用的php 操作 shell 包 php-shellcommand

3-28 2,399 views

Github :https://github.com/mikehaertl/php-shellcommand 安装 (php > 5.4) composer require mikehaertl/php-shellcommand 例子 <?php use mikeha...
阅读全文 1

PHP 如何使用 Service 模式?

3-21 3,033 views

若将商业逻辑都写在 controller,会造成 controller 肥大而难以维护,基于SOLID原则,我们应该使用 Service 模式辅助 controller,将相关的商业逻辑封装在不...
阅读全文 0

php 抓取自如友家首页的区域和地铁数据

3-21 2,094 views

步骤 使用composer安装 php抓取扩展包 composer require jaeger/querylist 分析自如首页html结构 经过分析发现区域和地铁数据在类名.clearfix.filterLi...
阅读全文 0

QueryList 一套简洁、优雅、可扩展的PHP采集工具(爬虫),基于phpQuery。

3-21 2,670 views

QueryList 简介 QueryList是一套简洁、优雅、可扩展的PHP采集工具(爬虫),基于phpQuery。 Github: https://github.com/jae-jae/QueryList packagist https:...
阅读全文 0