legend2v2---2、Target class [Frontend\EntryController] does not exist
legend2v2---2、Target class [Frontend\EntryController] does not exist
一、总结
一句话总结:
【少了这个use语句】,而且路由中的语法也变了
use App\Http\Controllers\Frontend; //首页 //Route::get('/', 'Frontend\EntryController@index'); //以前的语句,现在不能用了 Route::get('/', [Frontend\EntryController::class, 'index']);
二、Target class [Frontend\EntryController] does not exist
问题:
Illuminate\Contracts\Container\BindingResolutionException
Target class [Frontend\EntryController] does not exist.
解决:
use App\Http\Controllers\Frontend; //首页 //Route::get('/', 'Frontend\EntryController@index'); //以前的语句,现在不能用了 Route::get('/', [Frontend\EntryController::class, 'index']);