随笔分类 -  thinkphp + laravel

php 生成唯一编码函数
摘要:/** * [create_guid 生成guid 全球惟一标识符] * @return [type] [description] */ public function create_guid(){ $charid = strtoupper(md5(uniqid(mt_rand(), true))) 阅读全文
posted @ 2020-06-19 16:57 潇潇六月雨 阅读(396) 评论(0) 推荐(0)
thinkphp5 nginx.conf 配置
摘要:thinkphp5 nginx.conf 配置 server { listen 80; #域名 server_name youzuoapi.osd-asia.com; index index.php index.html index.htm default.php default.htm defau 阅读全文
posted @ 2020-01-03 10:53 潇潇六月雨 阅读(489) 评论(0) 推荐(0)
Thinkphp调用微信扫一扫实例,学会再也不怕客户在微信提的奇葩要求了
摘要:哎!苦于客户一直要求,官方文档看起来又蛋疼,磨了一个下午整理出一套试用Thinkphp 调用微信扫一扫示例别小瞧这些代码哦,它们能帮你实现几乎所有的微信功能^_^ 1 先在Thinkphp -- Vendor 目录下面创建WxJDK文件夹,然后在创建文件jssdk.php. <?php # + # 阅读全文
posted @ 2019-12-25 12:01 潇潇六月雨 阅读(340) 评论(0) 推荐(0)
thinkphp5 PHPExcel 引入与报错解决
摘要:文件目录 引入文件 use think\facade\App; require_once App::getRootPath().'/extend/PHPExcel/PHPExcel.php'; 报错: PHPExcel报错ZipArchive::locateName(): Excel版本问题。 解决 阅读全文
posted @ 2019-12-25 11:28 潇潇六月雨 阅读(1376) 评论(0) 推荐(0)
thinkphp5 二维码生成
摘要:1.下载二维码插件Phpqrcode,地址 https://sourceforge.net/projects/phpqrcode/files/,把下载的文件夹放到\thinkphp\vendor下 2.在公共函数库添加函数create_qrcode(); function create_qrcode 阅读全文
posted @ 2019-12-20 15:11 潇潇六月雨 阅读(548) 评论(0) 推荐(0)
thinkphp5 二维码生成 composer
摘要:进入extend文件夹 composer require endroid/qrcode 2.将二维码生成封装为服务 QrcodeServer.php代码如下: <?php /** * Created by PhpStorm. * User: cdjyj21 * Date: 2018/9/4 * Ti 阅读全文
posted @ 2019-12-20 15:00 潇潇六月雨 阅读(803) 评论(0) 推荐(0)
最完美ThinkPHP Nginx 配置文件
摘要:一个配置文件,完美支持普通,兼容,pathinfo,rewrite4种url模式,别怪我没提醒你收藏哦. 常见的静态文件404时也不会再去跑一遍fastcgi浪费资源。 server { listen 80; server_name localhost; root /var/www; index i 阅读全文
posted @ 2019-12-03 18:51 潇潇六月雨 阅读(1043) 评论(0) 推荐(0)
swoole如何在后台运行
摘要:swoole如何在后台运行 nohup php server.php & 阅读全文
posted @ 2019-12-03 18:42 潇潇六月雨 阅读(978) 评论(0) 推荐(0)
laravel swoole Call to undefined method Illuminate\Events\Dispatcher::fire()
摘要:报错: Call to undefined method Illuminate\Events\Dispatcher::fire() Whoops\Run::handleError("Uncaught Error: Call to undefined method Illuminate\Events\ 阅读全文
posted @ 2019-12-03 17:11 潇潇六月雨 阅读(468) 评论(0) 推荐(0)
laravel-admin 添加图表 Chartjs
摘要:github地址:https://github.com/laravel-admin-extensions/chartjs Installation composer require laravel-admin-ext/chartjs php artisan vendor:publish --tag= 阅读全文
posted @ 2019-12-03 14:35 潇潇六月雨 阅读(3911) 评论(1) 推荐(0)
安装Maatwebsite \ EXCEL \ ExcelServiceProvider
摘要:安装时报错 composer You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode 解决: 1、 在根目录下的composer.json下的require中加入"maat 阅读全文
posted @ 2019-12-02 18:30 潇潇六月雨 阅读(1427) 评论(0) 推荐(0)
Laravel 中 Controller访问Model函数/常量
摘要:<?php // User.php class User extends Model { const USER_STATUS_ACTIVED = 1; //进行中 const USER_TYPE_TEST = 'test'; //测试用户 // 需要在控制器访问, 使用static public s 阅读全文
posted @ 2019-11-28 11:53 潇潇六月雨 阅读(577) 评论(0) 推荐(0)
Laravel5如何向闭合函数内传递参数 where function 传参
摘要:如上,怎么将$title 像$query一样,在函数内部使用? $result = UserMenus::with(['menu'=>function($query){ $query->where('title',$title); }])->where('user_id',$userId)->fir 阅读全文
posted @ 2019-11-28 10:27 潇潇六月雨 阅读(1741) 评论(0) 推荐(0)
laraveladmin省市区三级联动
摘要:Distpicker是一个中国省市区三级联动选择组件,这个包是基于Distpicker的laravel-admin扩展,用来将Distpicker集成进laravel-admin的表单中 安装 composer require laravel-admin-ext/china-distpicker 然 阅读全文
posted @ 2019-11-27 16:33 潇潇六月雨 阅读(1553) 评论(0) 推荐(0)
laravel中间件失效,配置文件重新加载
摘要:composer dump-autoload php artisan cache:clear 清理视图缓存 php atisan view:clear 清除运行缓存 php artisan cache:clear 清除配置 php artisan config:clear 清除路由缓存 php ar 阅读全文
posted @ 2019-11-26 17:07 潇潇六月雨 阅读(619) 评论(0) 推荐(0)
Laravel-admin 加载视图后,blade 模板 JS 失效
摘要:laravel-admin js无法解析 解决 在不需要使用 pjax 的地方使用 Admin::disablePjax(); 阅读全文
posted @ 2019-11-26 15:55 潇潇六月雨 阅读(1149) 评论(0) 推荐(1)
laravel-admin Field type [editor] does not exist.
摘要:把App/admin中的bootstrap.php 里边的Encore\Admin\Form::forget(['map', 'editor']);注释掉就行了 解决网址:http://tieba.baidu.com/p/6021404952 文档详细信息网址:https://laravel-adm 阅读全文
posted @ 2019-11-26 09:53 潇潇六月雨 阅读(2090) 评论(0) 推荐(0)
laravel-admin 表单提交报错
摘要:Method App\Admin\Controllers\GoodsSpecController::store does not exist. Method App\Admin\Controllers\GoodsSpecController::update does not exist. 解决: 方 阅读全文
posted @ 2019-11-25 12:58 潇潇六月雨 阅读(1698) 评论(0) 推荐(0)
laravel-admin利用ModelTree实现对分类信息的管理
摘要:根据laravel的基本操作步骤依次完成如下操作:主要是参考laravel-admin内置的Menu菜单管理的功能,利用ModelTree实现业务中的Tree数据管理。 1. 创建模型 php artisan make:model Models/Category 2. 创建迁移文件 php arti 阅读全文
posted @ 2019-11-25 11:31 潇潇六月雨 阅读(1118) 评论(0) 推荐(0)
laravel-admin后台框架基本使用
摘要:建立控制器 在app/Admin/Controllers新建对应的控制器来管理某个数据表。控制器例子: <?php namespace App\Admin\Controllers; use Encore\Admin\Form; use Encore\Admin\Grid; use Encore\Ad 阅读全文
posted @ 2019-11-15 16:40 潇潇六月雨 阅读(1632) 评论(0) 推荐(0)