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.

Laravel - Method [xxx] does not exist on [xxx]的更多相关文章

  1. MySQL错误:The user specified as a definer (XXX@XXX) does not exist

    今天由于更换服务器,重新再本地备份了数据库,试运行程序报错,如下: MySQL错误:The user specified as a definer (XXX@XXX) does not exist 意 ...

  2. 使用Phalcon开发工具碰到的数据库问题"Table 'XXX' doesn't exist in database when dumping meta-data for XXX"

    使用Phalcon开发工具,通过命令行生成程序框架 设置好config.php,在对数据库进行读取.保存数据的时候出现了问题“Table 'XXX' doesn't exist in database ...

  3. Android JS桥交互("Uncaught ReferenceError: xxx is not defined or xxx has no method")

    网上android和js交互的代码有不少,也很容易搜到.最近在做的项目需要用到js桥,遇到了一些问题,记录下来,希望以后遇到能马上解决掉. 一开始我找的demo是从这个:http://blog.csd ...

  4. hibernate-Table 'XXX.XXX' doesn't exist

    hibernate---Table 'XXX.XXX' doesn't exist 在设置自动生成数据表的策略中: <!-- 自动生成数据表的策略 --> <property nam ...

  5. MySQL错误:The user specified as a definer (XXX@XXX) does not exist (1449错误)最简解决方案

    背景:从同事处通过备份和还原备份方法导入mysql数据库,导入成功后启动项目,发现出现以下错误:The user specified as a definer (XXX@XXX) does not e ...

  6. mysqldump: Got error: 1449: The user specified as a definer ('xxx'@'%') does not exist when using LOCK TABLES

    开发同学说在测试环境使用mysqldump导出数据的时候遇到以下错误: # mysqldump -uroot -p --all-databases --routines --events --trig ...

  7. Linux下MySQL报Table 'xxx' doesn't exist错误解决方法,表名存在大小写区分

    Linux服务器上在线装了个MySQL,但是部署web应用时一直报后台一直报错:Table 'xxx' doesn't exist. 本地测试一直都是正常的,同样的代码,同样的数据库,表是存在的,但是 ...

  8. href="javascript:xxx(this);"和onclick="javascript:xxx(this);"的区别

    href="javascript:xxx(this);"和onclick="javascript:xxx(this);" 一直以为这两种写法是等同的,今天在项目 ...

  9. 项目 XXX 的 NuGet 程序包还原失败:找不到“xxx”版本的程序包“xxx”

    项目 XXX 的 NuGet 程序包还原失败:找不到“xxx”版本的程序包“xxx” 编译新下载的代码出错 修改包管理器的源为 http://www.nuget.org/api/v2/ .重试后成功 ...

随机推荐

  1. 请简述get请求和post请求的区别

    ①get比post快 ②get体积小,post可以无限大 ③get在浏览器退回时无害,post会再次请求 ④get的url参数可见,post不可见 ⑤get请求数据放在url,post数据放在http ...

  2. 项目中常用的js方法封装---自留

    1.输入一个值,返回其数据类型 type = para => { return Object.prototype.toString.call(para).slice(8,-1) } 2.冒泡排序 ...

  3. SQL数据同步到ELK(四)- 利用SQL SERVER Track Data相关功能同步数据(上)

    一.相关文档 老规矩,为了避免我的解释误导大家,请大家务必通过官网了解一波SQL SERVER的相关功能. 文档地址: 整体介绍文档:https://docs.microsoft.com/en-us/ ...

  4. mysql(六)数据库连接池

    什么是数据库连接池 数据库连接池(Connection pooling)是程序启动时建立足够的数据库连接,并将这些连接组成一个连接池,由程序动态地对池中的连接进行申请,使用,释放 数据库连接池的运行机 ...

  5. 软件工程1916|W(福州大学)_助教博客】个人总结作业(第12次)成绩公示

    1.作业链接 个人作业--软件工程实践总结作业 https://edu.cnblogs.com/campus/fzu/SoftwareEngineering1916W/homework/3316 2. ...

  6. 《Linux就该这么学》培训笔记_ch18_使用MariaDB数据库管理系统

    <Linux就该这么学>培训笔记_ch18_使用MariaDB数据库管理系统 文章最后会post上书本的笔记照片. 文章主要内容: 初始化MariaDB服务 管理用户以及授权 创建数据库与 ...

  7. spark 存取mysql

    1.先上代码,存入mysql val spark = SparkSession.builder() .appName("jdbc") .getOrCreate() import s ...

  8. 关于Keras 版本的安装与修改

    神经协同过滤(Neural Collaborative Filtering)神作的源码的实验设置要求是: 然而,我们使用控制台 (命令:)或者是PyCharm直接安装的版本均是 最新版本(即 2.0版 ...

  9. TP-LINK WR703N OpenWrt 无线配网历程

    ① 创建了两个 Interfaces,名字分别为 lan.wlan0 (可自行设定),一个负责连接 PPPoE,一个负责提供 AP 热点. ② 配置 wlan0 相关 ip 地址,该地址为无线网内网地 ...

  10. 自定义标签&JSON数据处理

    最近几日去参加一些面试,多多少少有一些收获. 现将遇到的一些面试题,做一下分析和总结. 1.使用原生JS,不能使用递归,查找dom中所有以“<com-”开头的自定义标签tagName. < ...