In api.php routes file below, there are public routes and private routes:
api.php
Route::group([\'namespace\' => \'API\'], function() { // Publ
Pass the api guard as a parameter to fetch the authorized user without the middleware protecting the request.
api
$request->user('api'); // Or auth('api')->user();