首页
Search
1
远程更新git项目代码
25 阅读
2
php 高并发总结
20 阅读
3
Linux 学习笔记 #3 用户跟用户组管理
19 阅读
4
Sql的执行顺序
19 阅读
5
Linux 学习笔记 #4 磁盘管理
16 阅读
lnmp
js
react
git
redis
mysql
php
laravel
闲谈
linux
python
c
51
go
Search
标签搜索
git
laravel
composer
php
Typecho
累计撰写
96
篇文章
累计收到
0
条评论
首页
栏目
lnmp
js
react
git
redis
mysql
php
laravel
闲谈
linux
python
c
51
go
页面
搜索到
3
篇与
laravel
的结果
2015-12-06
Laravel调试方法
这篇文章用于列举Laravel的调试方法1.最常用的 dd(),var_dump();2.debug插件。可以显示sql执行时间,语句。用来做Laravel优化也不错。插件Github地址https://github.com/itsgoingd/clockwork3.Log::info(),Log::error() 打印的结果在storage文件夹里面。比如淘宝的异步通知,就可以用这个测试,很方便。4.打印Laravel sql语句方法$queries = DB::getQueryLog(); $last_query = end($queries);或者DB:listen(function($sql)){ Log:info($sql->sql.'--'.$sql->time) }
2015年12月06日
0 阅读
0 评论
0 点赞
2015-12-06
Laravel常见错误
1.Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException ①没有这个路由或者控制器没有这个方法。②路由中绑定了对象,根据路径的值去找对象,没有找到这个对象,也是报这个错2.Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException 当提交表单的方法是POST时候,得提交_token值,当然你也可以选择禁用token,或者只让某个路由post提交时,不用验证_token,比如APP与网站API的交互,淘宝的异步通知。<input type="hidden" name='_token' value="{{csrf_token();}}">3.You need to use the $fillable property in your Activation class when you use Mass Assignment.你使用的插入sql语句需要给Model添加可批量插入字段白名单。protected $fillable = ['id', 'token']; 4.Relationship method must return an object of type IlluminateDatabaseEloquentRelationsRelation你可能调用了 $model->user这样的方法,找不到user这个对象或者属性报错。
2015年12月06日
7 阅读
0 评论
0 点赞
2015-12-05
Laravel 中文手册
Laravel4.0chm版,laravel离线网页版(4.0,4.1,5.0,5.1)
2015年12月05日
0 阅读
0 评论
0 点赞