摘要:
1.安装扩展包 composer require workerman/gateway-worker composer require workerman/gatewayclient 2.生成命令文件 php artisan make:command Workerman <?php namespace 阅读全文
摘要:
<?php namespace App\Http\Middleware; use Closure; class AllowCrossRequest { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $req 阅读全文
摘要:
1.config/filesystems.php 2.文件上传和删除 //保存到本地 $fileName = $file->store('image', 'tmp'); //删除本地文件Storage::disk('tmp')->delete($fileName); 阅读全文
摘要:
1.创建规则对象php artisan make:rule IdCard2.编写验证规则 <?phpnamespace App\Rules;use Illuminate\Contracts\Validation\Rule;class IdCard implements Rule{ /** * Cre 阅读全文
摘要:
1.创建模型工厂 php artisan make:factory AdminFactory --model=Admin <?php/** @var \Illuminate\Database\Eloquent\Factory $factory */use App\Models\System\Admi 阅读全文
摘要:
//文件被添加特殊属性后不能修改 //查看文件特殊权限-ia会导致文件无法修改 lsattr 文件名 //移除特殊属性 chattr -ia 文件名 阅读全文
摘要:
1.创建任务类php artisan make:job ProcessPodcast2.任务类里写业务逻辑 public function handle(){ // TestModel::create(['content' => time()]);}3.开启队列php artisan queue:w 阅读全文
摘要:
import requests url = 'https://cyv.waosmart.com/' data = {'keywords': 'python'} resp = requests.post(url, data=data) print(resp.json()) resp.close() 阅读全文
摘要:
import requests url = 'https://cyv.waosmart.com/' param = { 'start': 0, 'limit': 10 } headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; 阅读全文