下面是我们整理的php的laravel学习的常见的错误以及解决的办法,我还会持续更新,请关注



## 错误1:

错误代码:

1
Driver [] is not supported. (View: E:\www2017\laravel\resources\views\Blog\list.blade.php)

错误原因:

1
单词写错

解决办法:

1
"iamge "改为"image"


## 错误2:

错误代码:

1
Undefined variable: blogs (View: E:\www2017\laravel\resources\views\Blog\list.blade.php)

错误原因:

1
单词写错

解决办法:

1
"list"改为"edit"


## 错误3:

错误代码:

1
Undefined variable: id

错误原因:

1
少写参数

解决办法:

1
在标记的地方加“ $id ”


## 错误4:

错误代码:

1
2
InvalidArgumentException
View [Index.index] not found.

错误原因:

1
找不到视图文件 index

解决办法:

1
前台页面命名的时候  文件名.balde.php


## 错误5:

错误代码:

1
Driver [] is not supported.

错误原因:

1
图片的上传路径有问题

解决办法:

1
修改了参数原因是在config/filesystems中配置的事upload为文件上传


## 错误6:

错误代码:

1
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)

错误原因:

1
配置文件没修改正确

解决办法:

1
config ->database.php->'strict'=>false