找不到致命错误异常类app \ http \ controllers \ controller

时间:2017-01-24 10:18:25

标签: php laravel routes laravel-5.3 classnotfoundexception

致命错误

  

找不到异常类app \ http \ controllers \ controller

当我运行命令php artisan route:list和其他所有命令都正常工作。 我将我的项目命名为" Socialite"并将命名空间命名为controller.php as" 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 个答案:

答案 0 :(得分:0)

您应该使用此命令重命名应用程序:

php artisan app:name Socialite

或者更改应用程序手动使用的所有类的命名空间,例如Controller.php命名空间将为:

namespace Socialite\Http\Controllers;