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 Thank you. It worked.
Please sign in or create an account to participate in this conversation.