laravel - ReflectionException in Container.php, Class not found?
ReflectionException in Container.php, Class not found?
PUBLISHED 3 YEARS AGO BY KENNETHJAYSONE
I'm not sure why i'm having this issue on Envoyer and not on my local homestead
ReflectionException in Container.php line 736:
Class App\Http\Controllers\DashboardController does not exist
My DasboardController is namespaced:
<?php namespace App\Http\Controllers;
use View;
use Mail;
use Sentinel;
use Redirect;
use Validator;
use Activation;
use Reminder;
use URL;
use Config;
use Session;
/**
* Interfaces to access
*/
use Acme\Cars\CarInterface;
use Acme\Media\MediaInterface;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
/**
* Requests
*/
use App\Http\Requests\PostACarRequest;
/**
* Class DashBoardController
* @package App\Http\Controllers
*/
class DashBoardController extends AuthorizedController {
}
My composer.json is like this:
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
},
"psr-0": {
"Acme": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
I've followed the steps to upgrading to laravel 5.1 using this article
http://laravel.com/docs/5.1/upgrade#upgrade-5.1.0
Everything works fine on my machine It's so weird im really not sure what to do.
Best Answer(As Selected By kennethjaysone)

@kennethjaysone Check your capitalisation!
Class App\Http\Controllers\DashboardController does not exist
Your Controller is called DashBoardController
class DashBoardController extends AuthorizedController {
}
Your host system (Windows or Mac) is case insensitive by default, and Homestead inherits this behaviour. Your production server on the other hand is case sensitive.
Whenever you get a ClassNotFound Exception
check the following:
- Spelling
- Namespaces
- Capitalisation

mstnorris
3 years ago(499,525 XP)
@kennethjaysone Check your capitalisation!
Class App\Http\Controllers\DashboardController does not exist
Your Controller is called DashBoardController
class DashBoardController extends AuthorizedController {
}
Your host system (Windows or Mac) is case insensitive by default, and Homestead inherits this behaviour. Your production server on the other hand is case sensitive.
Whenever you get a ClassNotFound Exception
check the following:
- Spelling
- Namespaces
- Capitalisation

kennethjaysone
3 years ago(15,020 XP)
@mstnorris Thank you. It worked.

Martha
1 year ago(6,330 XP)
it worked with me after I run "composer update"

kiiyaerick
10 months ago(10,610 XP)
Worked with me after running composer dump-autoload.
Please sign in or create an account to participate in this conversation.
CHOOSE A FILTER
OR PICK A CHANNEL

404 error on /login

Controller not found

Trouble installing on Windows 10

custom messages in reset password form don´t show

Whoops, looks like something went wrong.

Laravel auth with custom error messages

How to display values in returned from ajax call in tabular format Laravel?

Queued tasks are executing as part of the controller, causing app to freeze

User with many relationships, loop within Job class

Dynamic Drop Down
Lots of your peers think Laracasts is one of the best things ever. So buy Jeffrey lunch once a month, see for yourself, and massively level up your skills in the process.
LEARN
DISCUSS
laravel - ReflectionException in Container.php, Class not found?的更多相关文章
- Laravel之Service Container服务容器
managing class dependencies and performing dependency injection. Dependency injection is a fancy phr ...
- 深入讲解 Laravel 的 IoC 服务容器
众所周知,Laravel 控制反转 (IoC) / 依赖注入 (DI) 的功能非常强大.遗憾的是, 官方文档 并没有详细讲解它的所有功能,所以我决定自己实践一下,并整理成文.下面的代码是基于 Lara ...
- Laravel 学习笔记之 Composer 自动加载
说明:本文主要以Laravel的容器类Container为例做简单说明Composer的自动加载机制. Composer的自动加载机制 1.初始化一个composer项目 在一个空目录下compose ...
- Laravel核心之IOC和Facade 架构分析1
控制反转(Inversion of Control) 缩写为IoC 最常见的方式叫做依赖注入 简单说来,就是一个类把自己的的控制权交给另外一个对象,类间的依赖由这个对象去解决. Laravel 中的使 ...
- laravel学习:模块化caffeinated
# Modules Extract and modularize your code for maintainability. Essentially creates "mini-larav ...
- Laravel修炼:服务容器绑定与解析
前言 老实说,第一次老大让我看laravel框架手册的那天早上,我是很绝望的,因为真的没接触过,对我这种渣渣来说,laravel的入门门槛确实有点高了,但还是得硬着头皮看下去(虽然到现在我还有很多 ...
- How To Use The Repository Pattern In Laravel
The Repository Pattern in Laravel is a very useful pattern with a couple of great uses. The first us ...
- 【PHP】用了这么久的Laravel框架,你分析过核心架构了没
Laravel最初的设计是为了面向MVC架构的,它可以满足如事件处理.用户身份验证等各种需求.另外它还有一个由管理数据库强力支持,用于管理模块化和可扩展性代码的软件包管理器. Laravel以其简洁. ...
- 记一次laravel-jwt修改黑名单所用redis数据库
场景是这样的,我用tymon/jwt包做鉴权.jwt是自编码token,过期前想要强制失效只能将其加入黑名单中,黑名单一般用缓存存储. 但会有一个问题,若某种意外情况不小心执行了php aritsan ...
随机推荐
- Python扩展包
Python扩展包 1.NumPy NumPy提供了多种python本身不支持的多种集合,有list.ndarray和ufunc. list 更加灵活的数组,支持多维,数据可不同型,存储数量远大于ar ...
- vos话务抽查小方法
问题: 假如现在公司落地前缀主要有三个分别如下: 9150:主要用来走正规量 880:用来走正规量 660:全业务(合法) 已知: 非法业务量主要有:博彩,发票,白银,黄金,期货 合法非正规量有:保健 ...
- linux下安装mysql并修改密码
删除已有mysql并重新安装mysql 查看是否已安装过mysql rpm -qa |grep -i mysql 2.移除安装的包 (在之前如果有启动mysql最好关掉服务) 使用rpm –ev 包名 ...
- 【BZOJ1858】[SCOI2010] 序列操作(ODT裸题)
点此看题面 大致题意: 给你一个\(01\)序列,让你支持区间赋值.区间取反.区间求和以及求一段区间内最多有多少连续的\(1\)这些操作. \(ODT\) 这道题正解似乎是线段树,但码量较大,而且细节 ...
- python 造轮子(一)——序列与字典
虽然说造轮子很少用了,什么底层东西很少写,但是还是很想学扎实,还是好多东西还是的会,没有底层的支持,比较高级的库学起来还是很困难的. 序列的普遍用法: #-*-coding:utf8-*- #索引 l ...
- BZOJ 3233: [Ahoi2013]找硬币
BZOJ 3233: [Ahoi2013]找硬币 标签(空格分隔): OI-BZOJ OI-DP Time Limit: 10 Sec Memory Limit: 64 MB Description ...
- Java 压缩文件夹工具类(包含解压)
依赖jar <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons ...
- MongoDB在MFC下使用C++驱动编译错误的解决
.post p{text-indent: 2em;} 今天使用MongoDB的C++驱动,在编译连接的时候一直出现错误,显示的string_data.h下93行max宏的问题,可视其本身并不是调用ma ...
- 使用cmd命令创建maven(web)项目+项目转换成IDEA项目+项目打包+Jetty运行Web项目
3条件:配置好环境 配置环境教程:https://www.cnblogs.com/weibanggang/p/9623705.html 第一步:查看版本信息,在cmd输入mvn –version,如果 ...
- javascript入门笔记7-计时器
计时器 语法: setInterval(代码,交互时间) 参数说明: 代码:要调用的函数或要执行的代码串. 交互时间:周期性执行或调用表达式之间的时间间隔,以毫秒计(1s=1000ms). 例子: & ...