The controller is existing, and the method 'test' exist on 'App\Http\Controllers\Admin\IndexController'. But Laravel show me that there is no method on the controller, I don't know why. I have askd for help on the internet, but no one can help me. The error like pic1.

Now I show you my project folder and the files.

The namespace of the IndexController.php is right. And the method test is existed. But Laravel told me that Method does not exist... I don't know what happend!

Maybe you have the same trouble, now, I will give you a way to solve the problem. Then, let's go.

Look at this file.

There is a backup file in my project. I had edited the controller file after created the backup file. So the content of the two files is different. Initially, there is no problem. but when i execute the command "composer update"... Oh, my god!

Now, look at the directory vendor/composer, and open the file autoload_clappmap.php and autoload_static.php. Search IndexController in the two files.

In autoload_classmap.php:

In autoload_static.php:

Look at the red box. The real file is not IndexController.php, but is the backup file. I have said, the two file is different. The method test does not on IndexController.bk.php. So Laravel show me the error.

We have known why the problem happend. Now, we should solve it.

1) Update the 'IndexController.bk.php' to 'IndexController.php' that in the autoload_classmap.php and autoload_static.php.

2) Or you can delete the backup file or move it to other directory, then do 1).

3) Or you can delete the backup file or move it to other directory. Then execute the command composer update. But it is slow...

REPORT:

Developing good programming habits can avoid many mistakes.

最新文章

  1. LIST-PROCESSING用法 ABAP任意时刻进行List输出_SAP
  2. HDU 3688 Searchlights(并查集)
  3. Java多线程的实现
  4. HTML5与CSS3权威指南.pdf3
  5. Linux命令学习计划【sed】
  6. 找呀志_ContentResolver操作ContentProvider数据
  7. Visual Studio 2014
  8. 423. Reconstruct Original Digits from English (leetcode)
  9. Docker:单机编排工具docker-compose [十二]
  10. Android Studio旧版(内含SDK)安装和环境变量配置 转自I-T枭
  11. 支持向量机(Support Vector Machine):对偶
  12. 大量数据的excel导出
  13. mysql学习笔记--数据库索引
  14. 微信小程序 刷新当前页面
  15. ionic使用的一些技巧
  16. 铁板纹理 Base Shape
  17. 一文揭秘定时任务调度框架quartz
  18. 编译Spring源码
  19. Zookeeper的java客户端API使用方法(五)
  20. 关于ZedGraph几个难点

热门文章

  1. Vim编辑器点滴积累
  2. css3中的box-sizing常用的属性有哪些?分别有什么作用?
  3. (转)Qt中文手册 之 QApplication
  4. 牛客NOIP暑期七天营-提高组1
  5. 【AGC009E】Eternal Average
  6. 09-排序3 Insertion or Heap Sort (25 分)
  7. Kubeadm部署安装kubernetes1.12.1
  8. ASP.NET Core WebApi基于JWT实现接口授权验证
  9. 解决Spring和SpringMVC扫描注解类的冲突问题
  10. Java 中将字符串数组转换为字符串