
H5,laravel
kevinzip
一个靠嘴输出代码的程序员
展开
-
laravel在数据库用get()方法查询,结果不为null
laravel在数据库用get()方法查询,结果不为null。 var_dump 之后我们很容易发现,即使取到的空结果集,Eloquent 仍然会返回object(Illuminate\Support\Collection)对象实例。 其实,Eloquent 已经给我们封装几个判断方法如下: $users = DB::table('users')->where('id',$id)转载 2017-10-16 00:03:41 · 3925 阅读 · 0 评论 -
使用lavarel5.1碰到No supported encrypter found. The cipher and / or key length are invalid.
问题: No supported encrypter found. The cipher and / or key length are invalid. 网上查了一下,http://blog.youkuaiyun.com/leedaning/article/details/53019572如果和我下面说的问题不是一样请参照这个吧, 我碰到这个问题,真查了一下,最后发现是我自己没有改.env的文件,原创 2018-01-29 10:58:56 · 397 阅读 · 0 评论