致命错误
找不到异常类app \ http \ controllers \ controller
当我运行命令php artisan route:list和其他所有命令都正常工作 . 我将我的项目命名为“Socialite”,并将controller.php的命名空间命名为“namespace Socialite \ Http \ Controllers;” . 我也自动转储了我的项目 . 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();
1 回答
您应该使用此命令重命名应用程序:
或者更改您的应用程序手动使用的所有类的命名空间,例如
Controller.php
命名空间将是: