排序
pecl的安装
下载//curl Mac自带 curl -O https://pear.php.net/go-pear.phar安装sudo php -d detect_unicode=0 go-pear.phar //执行以上命令后会进行安装过程,会有一些配置选项 输入1,回车,配置pear路径...
laravel数据库迁移
创建迁移文件,文件目录database/migrationsphp artisan make:migration create_users_table编写代码<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\...
twilio发送短信 php
composer安装sdk发送demo// Your Account SID from www.twilio.com/console $sid = 'ACe161***********************defeab'; // Your Auth Token from www.twilio.com/console $token = 'c400b4...
springboot接口实践-RESTful API 架构风格
REST 是 Representational State Transfer 的缩写,如果一个架构符合 REST 原则,就称它为 RESTful 架构;RESTful 架构可以充分的利用 HTTP 协议的各种功能,是 HTTP 协议的最佳实践;RESTful A...
php去除HTML标签、图像等仅保留文本
if (!function_exists('strip_html_tags')) { /** * 去除HTML标签、图像等 仅保留文本 * @param $str * @param int $length * @return array|string|string[]|null */ function strip_html_tags...
vue往数组中追加字段
例:往数组中追加color字段let result = res.data let c = ['red','cyan','blue','green','orange','purplered','purple','brown','yellowgreen','grey'] for(let i = 0 ; i < result.length...
vue生成随机数
Math.random()*10 //生成0-10的随机数,包含0,不包含10 Math.ceil(Math.random()*10) //ceil向上取整,即生成1-10的随机整数,取0的概率极小 Math.floor(Math.random()*10) //floor向下取整,...
vue对数组元素进行筛选filter
let arr = [1,2,3,4,5,6,7,8]; let res = arr.filter(function(item,index,array){ //元素值,元素的索引,原数组。 return (item > 6); }); //[7,8] console.log(res);
laravel数据库迁移-数据填充
数据迁移请查看 https://jsjxsz.cn/316.html创建数据填充文件:php artisan make:seeder FriendsHashMobileSeeder编写代码<?php use Illuminate\Database\Seeder; class FriendsHashMobileSe...