摘要: 记录帖 一、授权 只允许管理员删除用户,给管理员授权时,可以这样做,首先: 创建UserPolicy类: 然后在AuthServiceProvider里添加: app/providers/AuthServiceProvider.php 阅读全文
posted @ 2018-04-13 10:30 一轮明月随潮涌 阅读(504) 评论(0) 推荐(0) 编辑
摘要: 做密码加密,记录一下。 password_hash 函数在 PHP 5.5 时被引入。 此函数现在使用的是目前 PHP 所支持的最强大的加密算法 BCrypt 。例子: PASSWORD_DEFAULT - 使用 bcrypt 算法 (PHP 5.5.0 默认)。 注意,该常量会随着 PHP 加入更 阅读全文
posted @ 2018-04-13 10:17 一轮明月随潮涌 阅读(5187) 评论(0) 推荐(0) 编辑
摘要: 如何让背景图片填满屏幕,缩小屏幕不出现滚动条,实现如下 如何让背景图片填满屏幕,缩小屏幕不出现滚动条,实现如下 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> 阅读全文
posted @ 2018-04-12 14:14 一轮明月随潮涌 阅读(1702) 评论(0) 推荐(2) 编辑
摘要: 遇到错误如下, 错误提示:在model之下的button里有错误,type类型无法准确插入。 最后排查出来的结果是, 有一个button的type多打了一个空格!!! 阅读全文
posted @ 2018-04-11 13:35 一轮明月随潮涌 阅读(9467) 评论(0) 推荐(0) 编辑
摘要: [Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes 阅读全文
posted @ 2018-04-09 15:15 一轮明月随潮涌 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1、官网教程 https://git-scm.com/book/zh/v2 阅读全文
posted @ 2018-04-08 10:24 一轮明月随潮涌 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1、eloquent 关系理解: https://lvwenhan.com/laravel/423.html 阅读全文
posted @ 2018-04-08 10:15 一轮明月随潮涌 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 获取对象的程度,可以这样获取:var myObj = {a:1,b:2,c:3}var arr = Object.keys(myObj);var len = arr.length console.log(len)//3 阅读全文
posted @ 2018-04-04 16:54 一轮明月随潮涌 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 1、truncate table tablename 阅读全文
posted @ 2018-04-03 19:35 一轮明月随潮涌 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 我的本地是7.0.1,而下载下来的原来是运行在7.0.8版本的,于是执行:composer install 时,报了一堆错。解决办法:删掉composer.lock,重新composer install Problem 1 - Installation request for laravel/hor 阅读全文
posted @ 2018-03-30 15:12 一轮明月随潮涌 阅读(4435) 评论(0) 推荐(0) 编辑