摘要: 将博客搬至CSDN 阅读全文
posted @ 2019-10-09 15:25 miyaye 阅读(67) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/webskill/category/1067140.html laravel 5.4 新特性 component and slot 使用: 1.component panel Hello World Lorem ipsum dolor sit amet, 阅读全文
posted @ 2018-08-16 11:32 miyaye 阅读(263) 评论(0) 推荐(0) 编辑
摘要: middleware php artisan make:middleware isAdminMiddleware user表增加is_admin字段 值为 Y/N 模型user.php public function isAdmin(){ return $this is_admin == 1; } 阅读全文
posted @ 2017-09-04 10:27 miyaye 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 事件监听 方法一: web.php Event::listen('eloquent.created: App\post',function(){ dump('A post was created'); }); Route::get('/event53',function(){ \App\post:: 阅读全文
posted @ 2017-09-03 15:54 miyaye 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 实时facade 1. 创建一个目录叫services 创建一个weibo类 http = $http; } public function publish($status){ $this http post($status); } } 创建一个Http类 阅读全文
posted @ 2017-09-03 15:22 miyaye 阅读(285) 评论(0) 推荐(0) 编辑
摘要: laravel 邮件使用markdown php artisan make:mail lessonPublished markdown="emails.published" 这个命令不仅创建了email类文件 还生成了视图文件 并把视图也写好了 return $this markdown('emai 阅读全文
posted @ 2017-09-03 15:02 miyaye 阅读(336) 评论(0) 推荐(0) 编辑
摘要: component and slot 使用: 1.component panel Hello World Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis place 阅读全文
posted @ 2017-09-03 14:46 miyaye 阅读(232) 评论(0) 推荐(0) 编辑
摘要: routes/console.php copy一个默认的 Artisan::command('hello', function () { $this comment('hello world'); }) describe('Display an inspiring quote'); 这时候命令行就可 阅读全文
posted @ 2017-09-03 11:29 miyaye 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 查看本地分支 git branch 查看远程分支 git branch a 本地clone后切换master到monBlog分支 git checkout b monBlog emotes/origin/monBlog //git checkout b xxxx(本地分支名称) yyyy(上条命令查 阅读全文
posted @ 2017-09-02 14:55 miyaye 阅读(166) 评论(0) 推荐(0) 编辑
摘要: mail篇 public function via($notifiable) { return ['mail']; } 1.新建notification类 php artisan make:notification PostNotification 2.设置路由 //notification 注意默 阅读全文
posted @ 2017-09-01 18:45 miyaye 阅读(941) 评论(0) 推荐(0) 编辑
摘要: toggle方法主要用于多对多关系中,attach detach 比如点赞 收藏 1.user表 2.post表 title content 3.中间表 favoriate user_id post_id 4.user中定义关系 public function favorites(){ return 阅读全文
posted @ 2017-09-01 17:53 miyaye 阅读(604) 评论(0) 推荐(0) 编辑
摘要: 本文使用qq邮箱 env邮件配置: MAIL_FROM_ADDRESS = 17 92@qq.com MAIL_FROM_NAME = listen~ MAIL_DRIVER=smtp MAIL_HOST=smtp.qq.com MAIL_PORT=465 MAIL_USERNAME=17 2@qq 阅读全文
posted @ 2017-09-01 17:13 miyaye 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1.tinker 造假数据 ~~~~ factory('App\User',3) create(); ~~~~ DB::table 返回collection,可以用collection中的很多方法 比如 all() first(),这是5.3以后的新特性 5.2返回的是数组 ~~~~ DB::tab 阅读全文
posted @ 2017-09-01 15:34 miyaye 阅读(226) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-09-01 14:42 miyaye 阅读(1) 评论(0) 推荐(0) 编辑
摘要: LARAVEL NOTES {{toc}} laravel简介 laravel对php版本要求 laravel5 要求php 5.59 laravel 配置nginx后无法访问 给laravel下所有文件给读写权限 laravel配置文件 ~~~ server { listen 80; server 阅读全文
posted @ 2017-09-01 11:49 miyaye 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 表单验证方法1: 使用validate方法 ~~~~ public function store(Request $request){ $this validate($request, [ 'title' = 'required|unique:posts|max:255', 'body' = 're 阅读全文
posted @ 2017-09-01 11:42 miyaye 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-08-27 09:43 miyaye 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 验证数字的正则表达式集 验证数字:^[0-9]*$ 验证n位的数字:^\d{n}$ 验证至少n位数字:^\d{n,}$ 验证m-n位的数字:^\d{m,n}$ 验证零和非零开头的数字:^(0|[1-9][0-9]*)$ 验证有两位小数的正实数:^[0-9]+(.[0-9]{2})?$ 验证有1-3位小数的正实数:^[0-9]+(.[0-9]{1,3})?$ 验证非零的正整数:^\... 阅读全文
posted @ 2017-08-24 14:28 miyaye 阅读(54670) 评论(0) 推荐(1) 编辑
摘要: 比如监控 data中的list 阅读全文
posted @ 2017-08-22 09:00 miyaye 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 废话不多说,直接上代码,用了vue,可直接copy运行 阅读全文
posted @ 2017-03-20 14:55 miyaye 阅读(3105) 评论(0) 推荐(0) 编辑
摘要: 下载用ajax不好使,得用表单提交的方式 阅读全文
posted @ 2017-03-10 15:38 miyaye 阅读(164) 评论(0) 推荐(0) 编辑
摘要: vue init webpack#1.0 vue#1.0 阅读全文
posted @ 2017-02-22 10:19 miyaye 阅读(309) 评论(0) 推荐(0) 编辑
摘要: vue 中 /config/index.js, assetsPublicPath 的作用是便于访问打包后的静态资源,默认是相对于根 /, 当然如果直接把dist文件夹当成根来配置域名 可以什么都不用做。 这种情况主要用于 访问的地址不是根, 类似这种 http://local.wk.com/pro/ 阅读全文
posted @ 2017-02-22 09:41 miyaye 阅读(7776) 评论(0) 推荐(0) 编辑
摘要: 今天在做express的一个ajax请求的时候发现get请求成功,post 就一直是 404 not found, 研究了半天 才发现是express 的请求方法做了限制,之前一直都是用的 app.get,当然不能对post请求做出响应了,后来改成了 app.post 就一路顺利了。 阅读全文
posted @ 2016-09-18 11:40 miyaye 阅读(2140) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-10 21:03 miyaye 阅读(277) 评论(0) 推荐(0) 编辑
摘要: # 全局安装 vue-cli$ npm install -g vue-cli# 创建一个基于 "webpack" 模板的新项目$ vue init webpack my-project# 安装依赖,走你$ cd my-project$ npm install$ npm run dev用vue建项目后,npm install 发现老卡在chromedriver 报错上, 后来网上查了下,发现了解决办... 阅读全文
posted @ 2016-09-09 21:36 miyaye 阅读(5084) 评论(2) 推荐(3) 编辑
摘要: http://react-china.org/t/webpack/1870/2 webpack 文章 output中的[name]对应于entry中的key值,因此生成后的文件名是button.js和grid.js。 阅读全文
posted @ 2016-09-09 11:33 miyaye 阅读(1838) 评论(0) 推荐(0) 编辑
摘要: 方法一: 方法二: 阅读全文
posted @ 2016-09-08 15:32 miyaye 阅读(718) 评论(0) 推荐(0) 编辑
摘要: 图标转base64位 : http://www.askapache.com/online-tools/base64-image-converter/ 阅读全文
posted @ 2016-08-02 14:27 miyaye 阅读(160) 评论(0) 推荐(0) 编辑
摘要: http://www.jq22.com/yanshi2217 参考这个站 发现一些比较有用的canvas插件: 线形图插件:jquery.sparkline 2.1.1 excanvas 环形图,饼状图 easy-pi-chart http://echarts.baidu.com/ 阅读全文
posted @ 2016-07-06 13:17 miyaye 阅读(769) 评论(0) 推荐(0) 编辑
摘要: 当用curd生成控制器后,当修改的时候,会有这个提示,解决方法 在orm中通过事务的方式填充时间,然后把生成的form中的文件的时间段去掉 阅读全文
posted @ 2016-06-10 17:59 miyaye 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 这个问题 是由于编辑器没有设置utf8格式造成的,当然config里也要设置utf8 解决方法:编辑器设置utf8,重启 阅读全文
posted @ 2016-06-10 17:23 miyaye 阅读(374) 评论(0) 推荐(0) 编辑
摘要: http://getuikit.net/index.html 阅读全文
posted @ 2016-06-09 18:50 miyaye 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 多语言存数据库 http://blog.elendev.com/development/php/symfony/use-a-database-as-translation-provider-in-symfony-2/ symfony事件 http://wiki.jikexueyuan.com/pro 阅读全文
posted @ 2016-05-29 18:04 miyaye 阅读(167) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-05-28 12:12 miyaye 阅读(2) 评论(0) 推荐(0) 编辑
摘要: $this->get('database_connection')->fetchAll('select * from book where book.id=3') 阅读全文
posted @ 2016-05-28 12:01 miyaye 阅读(579) 评论(0) 推荐(0) 编辑
摘要: 上传文件对象在$_FILES['Filedata']对象中,临时路径是tmp_name,判断是上传文件是否为真实图片方法很多,我用的是这个: getimagesize 使用说明 http://php.net/manual/zh/function.getimagesize.php 阅读全文
posted @ 2016-05-27 11:21 miyaye 阅读(1900) 评论(1) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-05-26 15:00 miyaye 阅读(3) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-03-30 14:08 miyaye 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-02-27 20:08 miyaye 阅读(174) 评论(0) 推荐(0) 编辑