You can see that a new api folder has been added to the laravel project
This folder is used for the api interface for external development
The path under the api folder is
api\V1\UserController.php
And when defining routes in routes.php
$api = app('api.router');
$api->version('v1', function ($api) {
$api->get('users/{id}', 'Api\V1\UserController@show');
});
The class of this Api\V1\UserController
cannot be found
Where do I need to configure the Api namespace? Because the api directory is not registered in laravel at all
Where to configure?
composer.json