lundi 4 janvier 2016

Laravel 5.1 "ReflectionException in Container.php line 737:..class does not exist"

I'm sure that the solution to this problem is staring me right in the face, but unfortunately I can't seem to figure it out. I'm trying to add a route to my laravel 5.1 installation, and I'm getting the below error...

ReflectionException in Container.php line 737:
Class App\Http\Controllers\Tools\DashBoardController does not exist

I first edited the routes file to include the below...

(file: app\Http\routes.php)

 Route::get('dashboard', 'Tools\DashBoard@index');

Then I created the "Tools" folder and "DashBoardController.php" file, and have it setup to look somewhat like the below... (file: app\Http\Controllers\Tools\DashBoardController.php)

 namespace App\Http\Controllers\Tools\DashBoard;
 //...etc...//
 class DashBoardController extends Controller { /* ..etc.. */ }

Is this all I have to do? I read that you could run "composer dumpautoload" in the terminal but unfortunately that didn't help.

I'm on a localhost XAMPP install w/PHP7 on Win7, if that's useful. Any help is greatly appreciated!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire