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 ...
随机推荐
- matplotlib安装指南
matplotlib安装指南1.介绍NumPy地址 http://www.numpy.org/NumPy:一个Python一个扩展库,支持大量的维度数组和举证运算,对数组提供大量的函数库 SciPy地 ...
- 用SQL将数字转换为中文数字
IF OBJECT_ID('fn_GetChnNum') IS NOT NULL BEGIN DROP FUNCTION dbo.fn_GetChnNum; END; GO CREATE FUNCTI ...
- JavaScript(一) 对象基础
1.定义类或对象 1.1 混合的构造函数/原型方法 用构造函数定义对象的所有非函数属性,类似于Java的构造方法.用原型方法定义对象的函数属性(方法).这种方法是使用比较广泛的定义类或对象的方法. / ...
- PB导出规定格式DBF文件 dBase 3 格式 222个字段
最近在做一个给卫计委做数据上报的数据接口,接口要求使用奇葩的dBase 3数据库存储上报数据,忙活了几天总算搞好了,使用开发工具为powerbuild 12,222个字段的上报数据表生成DBF文件,写 ...
- py常见模块
1.系统相关的信息模块: import sys sys.argv 是一个 list,包含所有的命令行参数. sys.stdout sys.stdin sys.stderr 分别表示标准输入输出,错误输 ...
- QT学习之QPair类
#QPair类 QPair是一个用来存储一对对象的容器模板.其有两个值,first和second. QPair() QPair(const T1 & value1, const T2 & ...
- Jenkins使用分组过滤分类
背景:Jenkins项目过多,通过选项卡的方式过滤需要的项目 1.点击选择卡上的加号 2.填写要分组的名字 3.可选择某个job进行分类,或者使用正则表达式的方式进行分类,楼主是根据正则进行匹配, 4 ...
- eclipse的一些快捷键
ctrl + 1快速修复 ctrl + d 快速删除 ctrl + F11快速运行 ctrl + m 放大工作区 atl + /注释 ...
- HTTP的三次握手
在讲三次握手之前,希望大家理解一个概念,什么概念呢? 就是在我们的客户端和我们的服务器之间进行http请求,发送和返回的过程当中,我们是需要去创建一个tcp connection的东西,因为http是 ...
- 20145238-荆玉茗 《Java程序设计》第一周学习总结
20145238 <Java程序设计>第一周学习总结 教材学习内容总结 Java三大平台:由于java领域的应用越来越广,根据不同级别的应用开发区分了不同的应用版本,后正式更名为Java ...
