这是我的控制器: As seen in the screenshot,the class exists and is in the correct place: My api.php routegave me the following error: Target class [Api\RegisterController] does not exist. ---- Update: Thanks的答案我决定对此路由使用完全限定的类名,但还有答案中描述的其他选项。
我正试图为我的应用程序创建一个API,这样我就可以共享端点,并将一个应用程序作为具有业务逻辑的核心应用程序,另一个应用程序可以与公开的端点连接,将函数作为服务使用。下面是我的路由/api.php}); return new PostModellResource(PostModell::all());我的资源类看起来像