摘要:
//添加 'name' => 'required|unique:icons,name,NULL,id,deleted_at,NULL', //NULL必须大写 //修改 'name' => 'required|unique:icons,name,' . $request->id . ',id,del 阅读全文
摘要:
//composer require lustre/php-dfa-sensitive // $wordData = [ // '察象蚂', // '拆迁灭', // '车牌隐', // '成人电', // '成人卡通' // ]; // $handle = SensitiveHelper::ini 阅读全文
摘要:
$sql=Goods::select(['id','name']) ->where('id',1) // ->toRawSql() ->toSql(); 阅读全文
摘要:
$list=Scenics::select(['id','name'])->get(); $list->each->append('min_price'); 阅读全文
摘要:
$str = '姓名:{username},年龄:{age}'; preg_match_all("/[{](.*?)[}]/", $str, $res);//加?,使用非贪婪模式 return $this->success($res); { "status": "true", "code": 200 阅读全文
摘要:
bc函数库 https://www.php.net/manual/zh/ref.bc.php 阅读全文
摘要:
1.App\Providers\EventServiceProvider文件中添加事件和监听器 protected $listen = [ Registered::class => [ SendEmailVerificationNotification::class, ], 'App\Events\ 阅读全文
摘要:
扩展包: spatie/laravel-permission 常用方法: public function postTest(Request $request) { //新增角色 // $role = Role::create(['name' => '组长3']); //新增权限 // $permis 阅读全文
摘要:
use Illuminate\Contracts\Validation\Validator; public function failedValidation(Validator $validator) { $error_msg = $validator->errors()->first(); re 阅读全文
摘要:
$lists = Orders::with(['goods:order_id,name']) ->whereHasIn('goods', function ($query) use ($goodsName) { if ($goodsName) { $query->where('name', 'lik 阅读全文