原创 laraval 分頁
$res = $qry->paginate($num_per_page); foreach ($res->items() as $item) { $item->vendor_name = $item->order->vendo
原创 laravel resource route 接收前端提交的PUT 數據
/** * 更新策略 PUT (前端 raw(原始字符串)方式提交 一定要content-type: application/json) * @chelu */ public function
原创 gitee 倉庫改爲私密以後,需要添加ssh key的一些操作
linux 系統生產公鑰: cd 你的項目, git config user.name "你的username" git config user.email "[email protected]" ssh-keygen -t rsa -C xx
原创 nginx 配置https
server { listen 80; server_name www.wubuze.top; rewrite ^(.*) https://$host$1 permanent; } server { listen 80;
原创 cygwin 安裝swoole 報錯致命錯誤:pcre2.h:No such file or directory
make install 時報錯 In file included from /home/swoole-src-4.4.14/swoole.cc:20:0: /usr/include/php/ext/pcre/php_pcre.h:27
原创 element 組件upload form 驗證
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="80px" style="width:600px"> <el-form-item label=
原创 vue v-slot 插槽的使用
slot 已經廢棄,請使用v-slot代替 組件test: <template > <div style="width: 400px; border: 1px solid #ccc;"> <header
原创 產品圖文佈局
如下: 代碼: <el-row type="flex" > <div style="margin-right: 1pc"> <img :src="cover ? cover : 'http://qiniu
原创 javascript 獲取接口返回的二進制blob 數據,後再轉爲對應mime 文件
src/config/util.js export default{ blobTofile(res, filename = null) { const blob = new Blob([res.data], {
原创 laravel 模型關聯細節
laravel 模型關聯 假設有兩張表 用戶表(user)和 聯繫電話表(phone) user表有以下字段: id name phone:表有以下字段: id user_id \Model\User //user
原创 php 點語法獲取數組
//點語法獲取數組元素 private function getNestedVar(&$context, $name) { $pieces = explode('.', $name); foreach ($pieces
原创 laravel join 關聯查詢
laravel join關聯查詢 1、兩表關聯 $fbaInventoryTb = (new \App\Model\Amz\Fba\InventoryReport)->getTable(); $productTb = (new
原创 laravel Excel 導入導出
"maatwebsite/excel": "~2.1.0", 版本2.x.x 使用方法,注意3.x.x 不適用 use Excel; 導出: $cellData[] = [ '商品編碼','調撥數量']; //表頭 // f
原创 mysql 連接方式
unix系統上,mysql的登陸方式有兩種,分別是socket和tcp/ip方式登陸。 from: https://my.oschina.net/zjllovecode/blog/1617755 如: mysql -u root