摘要: 参考://json_decode($json) 用来把json字符串 转换成json数组的函数 $json = json_decode($jsonstr, true); //print_r($json); $res = [];$jsonname = $array['type_name'];echo 阅读全文
posted @ 2021-08-30 08:10 鱼祖 阅读(75) 评论(0) 推荐(0)
摘要: 下载layui文件 https://www.layui.com/(网址) 将文件放入根目录/pubilc/static 例如:列表功能 在官网上复制需要使用的代码放到我们的编辑器中 修改css地址 修改js地址 最后修改请求的接口与表字段 控制器器的代码参考: class Show extends 阅读全文
posted @ 2021-08-26 08:48 鱼祖 阅读(465) 评论(0) 推荐(0)
摘要: composer 安装JWT composer require lcobucci/jwt 3.3 前端代码参考: <body><p style="color: #5a6268;font-size: 30px;font-weight: bold;text-align: center;">登录页面</p 阅读全文
posted @ 2021-08-25 16:42 鱼祖 阅读(999) 评论(0) 推荐(0)
摘要: (思路:所有的页面先运行layout内的代码,在执行我们的特定字符串) 1、创建一个模版 php think build --module admin 2、创建控制器 php think make:controller admin/lists --plain 3、在 admin/config.php 阅读全文
posted @ 2021-08-24 14:10 鱼祖 阅读(380) 评论(0) 推荐(0)
摘要: 首先我们查询出被软删除的数据,将其展示在view上 model 代码参考如下: public static function seek(){ return self::onlyTrashed()->select();}在控制器中恢复被软删除的数据,通过id找到我们要恢复的数据controller 代 阅读全文
posted @ 2021-08-24 09:43 鱼祖 阅读(116) 评论(0) 推荐(0)
摘要: 首先在模型中我们要引入 use traits\Model\SoftDelete;在类中引入 use SoftDelete;模型层的代码参考:在这里我们需要注意一个问题,(添加的$delete_time的类型不能是时间戳类型 我们需要手动将其设置成int类型) <?phpnamespace app\a 阅读全文
posted @ 2021-08-24 09:37 鱼祖 阅读(155) 评论(0) 推荐(0)
摘要: 注意:(在使用资源控制器时,尽量隐藏入口文件 ) 在根目录/pubilc/.htaccess 放入以下代码: <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQ 阅读全文
posted @ 2021-08-24 09:19 鱼祖 阅读(300) 评论(0) 推荐(0)
摘要: 在做缩略图之前 我们首先要在项目中下载好缩略图的扩展包 参考 composer require topthink/think-image 1.*然后在控制器添加如下代码; public function addDo(){ $param=request()->param(); $file = requ 阅读全文
posted @ 2021-08-24 09:10 鱼祖 阅读(185) 评论(0) 推荐(0)