Now, in the same fashion, let's generate a Controller for the login mechanism:
php artisan make:controller Api/V1/Auth/LoginController
This will be the new route, in the routes/api.php file:
Route::post('auth/login', Auth\LoginController::class);
Again, the route prefix and Controller namespace will come automatically from the other logic we've discussed earlier, for RegisterController.
I've not seen a colon used like this before within the function parameters, could you explain how/why you have done it this way?
The best explanation probably is my video here: PHP 8 Named Arguments: Practical Example
Thank you will check that out :)