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)
![mstnorris](https://www.gravatar.com/avatar/546bfce9c6dbe159e0aa974076d26725?s=100&d=https%3A%2F%2Flaracasts.s3.amazonaws.com%2Fimages%2Fgeneric-avatar.png)
@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](https://www.gravatar.com/avatar/ccde4bdac5747b4f9c6aa93a6be2907a?s=100&d=https%3A%2F%2Flaracasts.s3.amazonaws.com%2Fimages%2Fgeneric-avatar.png)
@mstnorris Thank you. It worked.
Please sign in or create an account to participate in this conversation.