Laravel 컨트롤러 라우팅 시 "Class ... does not exist" 에러 발생 원인과 해결
·
Computer/PHP
상황 (Laravel 8 경험 사례)오랜만에 새로운 프로젝트를 Laravel 8로 시작.테스트 코드를 먼저 작성하는 방식으로 개발해보려 했는데, 시작부터 막혔다.라우트에 다음과 같이 컨트롤러를 연결하고 테스트를 실행했다.Route::get('/', 'BaseController@index')->name('site-index'); 그랬더니:Expected response status code [200] but received 500.The following exception occurred during the request:ReflectionException: Class "BaseController" does not exist in ... 컨트롤러를 못 찾는다는 게 이해가 안 됐다.Laravel 5.x를 쓸..