PHP
文章平均质量分 69
Richard-Z
这个作者很懒,什么都没留下…
展开
-
Laravel Maatwebsite 导入Excel
use Maatwebsite\Excel\Facades\Excel;use App\Imports\XXImport;$filePath = 'xxx.xlsx'; //$filePath 根据 config/filesystems.php文件中配置找到文件Excel::import($import,$filePath,null,\Maatwebsite\Excel\Excel::XLSX);XXImport<?phpnamespace App\Imports;..原创 2020-11-21 14:24:17 · 300 阅读 · 0 评论 -
Laravel 5.6 安装 guzzlehttp
环境:Laravel 5.6安装 composer require guzzlehttp/guzzle在vendor文件夹下,vendor\guzzlehttp\guzzle引入use GuzzleHttp\Client;官方例子$client = new GuzzleHttp\Client();$res = $client->request('GET', 'https://api.gi...原创 2018-05-18 19:47:10 · 2591 阅读 · 0 评论 -
Laravel5.6 SQL构造器 查看输出SQL
DB::enableQueryLog(); $data = DB::table('t')..... DB::getQueryLog(); 开启查询日志获取查询日志原创 2018-05-28 15:52:30 · 2066 阅读 · 0 评论 -
Laravel5.6 任务调度
定义调度在 app\Console\Kernel 中 编辑 protected function schedule(Schedule $schedule) { // $schedule->command('inspire') // ->hourly(); //to do something }进...原创 2018-06-05 21:48:18 · 476 阅读 · 0 评论 -
Laravel5.6 Class 'XMLWriter' not found
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)Class 'XMLWriter' not found系统centos原因 缺少 php71w-xml 解决方法:安装 yum install php71w-xml重启 php-fpm原创 2018-06-22 00:30:15 · 871 阅读 · 0 评论 -
Laravel5.6 中间件使用
创建中间件php artisan make:middleware [middleware name]编写中间件代码<?phpnamespace App\Http\Middleware;use Closure;class Test{ /** * Handle an incoming request. * * @para...原创 2018-09-01 22:23:36 · 523 阅读 · 0 评论 -
Laravel 5.6 创建命令 command
创建commandphp artisan make:command UpdateCameraStatus --command=camera:update_statusbogon:it richard$ php artisan make:command UpdateCameraStatus --command=camera:update_statusConsole command c...原创 2018-09-17 17:30:24 · 1427 阅读 · 0 评论