Level 8
aparently my question is really silly ha?
I might be doing something wrong or maybe I am confused.
I am trying to delcare an API rote in routes/api.php, but first of all I tried to test the default one
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
but whenever I call it (/api/user) ... I get nothing from it.
what about this ? How can I make it work? How can I write a route and return the logged user ?
Please or to participate in this conversation.