09 2021 档案

摘要:bc函数库 https://www.php.net/manual/zh/ref.bc.php 阅读全文
posted @ 2021-09-30 14:30 CanyingV 阅读(31) 评论(0) 推荐(0)
摘要:1.App\Providers\EventServiceProvider文件中添加事件和监听器 protected $listen = [ Registered::class => [ SendEmailVerificationNotification::class, ], 'App\Events\ 阅读全文
posted @ 2021-09-26 15:41 CanyingV 阅读(19) 评论(0) 推荐(0)
摘要:扩展包: spatie/laravel-permission 常用方法: public function postTest(Request $request) { //新增角色 // $role = Role::create(['name' => '组长3']); //新增权限 // $permis 阅读全文
posted @ 2021-09-26 10:34 CanyingV 阅读(409) 评论(0) 推荐(0)
摘要:use Illuminate\Contracts\Validation\Validator; public function failedValidation(Validator $validator) { $error_msg = $validator->errors()->first(); re 阅读全文
posted @ 2021-09-22 16:03 CanyingV 阅读(33) 评论(0) 推荐(0)
摘要:$lists = Orders::with(['goods:order_id,name']) ->whereHasIn('goods', function ($query) use ($goodsName) { if ($goodsName) { $query->where('name', 'lik 阅读全文
posted @ 2021-09-18 17:02 CanyingV 阅读(53) 评论(0) 推荐(0)
摘要:$data['base_path'] = base_path(); $data['config_path'] = config_path(); $data['yuming'] = url()->previous(); $data['app_path'] = app_path(); $data['pu 阅读全文
posted @ 2021-09-08 17:36 CanyingV 阅读(28) 评论(0) 推荐(0)
摘要:use Illuminate\Support\Facades\Route; Route::get('/', function () { return view('welcome'); }); Route::get('phpinfo', function () { return phpinfo(); 阅读全文
posted @ 2021-09-08 17:21 CanyingV 阅读(18) 评论(0) 推荐(0)
摘要:public function select(){ //查询一条 // $res=User::find(1); // $res=User::where('id',1)->first(); //查询单条数据的单个字段的值 // $res=User::where('id',1)->value('user 阅读全文
posted @ 2021-09-08 15:33 CanyingV 阅读(187) 评论(0) 推荐(0)
摘要:public function index() { $data = [ [ 'id' => 1, 'b' => '11', 'c' => '11', ], [ 'id' => 2, 'a' => '33', 'b' => '33', ], [ 'id' => 3, 'a' => '22', 'b' 阅读全文
posted @ 2021-09-08 09:10 CanyingV 阅读(39) 评论(0) 推荐(0)
摘要://导出excel public function dataToExcel($filename, $data, $header, $keys) { $html = $this->dataToHtml($data, $header, $keys); return $this->htmlToExcel( 阅读全文
posted @ 2021-09-07 08:45 CanyingV 阅读(93) 评论(0) 推荐(0)