下面是我们整理的php的laravel学习的常见的错误以及解决的办法,我还会持续更新,请关注
Symfony \ Component \ HttpKernel \ Exception \MethodNotAllowedHttpException
方法里边的参数写错了,文件引入错误!
把参数改回原来的,并且检查文件的路径
## 错误2:
Type error: Too few arguments to function App\Http\Controllers\IndexController::blog(), 0 passed and exactly 1 expected
语法错误
把IndexController中的blog方法的括号里的"$id"去掉。
## 错误3:
Route [blog.doadd] not defined. (View: E:\laravel55\resources\views\Blog\add.blade.php)
没有在routes\web.php中设置doadd路由
在routes\web.php中设置doadd路由
## 错误4:
Class App\Http\Request\BlogRequest does not exist
BlogRequest的末尾没有加s
在BlogRequest的末尾加s
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有