下面是我们整理的php的laravel学习的常见的错误以及解决的办法,我还会持续更新,请关注
Driver [] is not supported. (View: E:\www2017\laravel\resources\views\Blog\list.blade.php)
单词写错
把"iamge "改为"image"
Undefined variable: blogs (View: E:\www2017\laravel\resources\views\Blog\list.blade.php)
单词写错
把"list"改为"edit"
Undefined variable: id
少写参数
在标记的地方加“ $id ”
InvalidArgumentException
View [Index.index] not found.
找不到视图文件 index
前台页面命名的时候 文件名.balde.php
Driver [] is not supported.
图片的上传路径有问题
修改了参数原因是在config/filesystems中配置的事upload为文件上传
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sns.sns_users.md_img' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: select `sns_users`.`md_img`, `phone`, `sns_users`.`id` from `sns_blogs` left join `sns_users` on `user_id` = `sns_users`.`id` where date(sns_blogs.created_at) >= DATE_SUB(CURDATE(), INTERVAL 2 DAY) group by `phone` order by count(*) desc limit 9)
配置文件没修改正确
config ->database.php->'strict'=>false