1
votes

I'm Learning laravel php framework and I'm having a problem.
I'm using this tutorial And I'm having problem with:

Symfony\Component\HttpKernel\Exception\NotFoundHttpException

and

Class App\controllers\Admin\AuthController does not exist

I tried to do

composer dump-autoload

and

artisan dump-autoload

but nothing helped.

Here's the link of the repository on Github

3
when in doubt about class not found error after composer dump-autoload, goto vendor/composer/autoload_classmap.php and search for the class. it may happen that you have some typo in namespace or whatever but if it is register there, then you will know what to add. - itachi
have you added the route in ur routes file - Sameer Shaikh

3 Answers

0
votes
  1. Can you give more details on which route this throwing the exception
  2. Take a look at http://laravel.com/docs/installation on how to setup Laravel 4, see if you have missed any steps
0
votes

Namespaces are case sensitive:

You must change:

Route::get('admin/logout', array(
  'as' => 'admin.logout',
  'uses' => 'App\controllers\Admin\AuthController@getLogout'
));

to

Route::get('admin/logout', array(
  'as' => 'admin.logout',
  'uses' => 'App\Controllers\Admin\AuthController@getLogout'
));
0
votes

In file BaseController.php

use Illuminate\Routing\Controller;

In file AuthController.php

use App\Controllers\BaseController;