1.按照之前的版本怎么写laravel8路由,会出现引用文件找不到的问题。下面确认三种写法都有效:controller2下创建一个controller文件,在routes\api.php中配置:官方推荐方法1:参考useApp\Http\Controllers\UserController;实际使用时调用时使用域名加api/test引用,index为controller中的方法名Route::get('/test',[UserController::class,'index']);自己试试方法2:直接参考Route::get('test','App\Http\Controllers\UserController@index');方法三:路由::get('/test',['App\Http\Controllers\UserController','index'],'UserController@index');如果你想在laravel8中使用matchRoute::match(['get','post')],'/getParame',[DvwaController::class,'getPramater']);
