简体   繁体   中英

Fatal Error Exception class app\http\controllers\controller not found

Fatal Error

Exception class app\\http\\controllers\\controller not found

while I run the command php artisan route:list and other all commands are working correctly. I have named my project as "Socialite" and give namespace to controller.php as "namespace Socialite\\Http\\Controllers;". I also auto-dumped my project. there is no any syntax error in routes/web.php.

<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/

Route::get('/', 'HomeController@index')->name('start');



Route::get('/signup','HomeController@getSignup')->name('auth.signup');
Route::post('/signup','HomeController@postSignup')->name('auth.signup');

Route::get('/signin','HomeController@getSignin')->name('auth.signin');
Route::post('/signin','HomeController@postSignin')->name('auth.signin');
Auth::routes();

You should use this command to rename an app:

php artisan app:name Socialite

Or change namespace of all classes your app uses manually, for example for Controller.php namespace will be:

namespace Socialite\Http\Controllers;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM