// routes/api.php
// This endpoint doesn't need authentication
Route::get('/public', function (Request $request) {
return response()->json([
"conference" => "Welcome to Laravel Live IN.",
"token" => "not required",
"message" => "You don't need to be authenticated to see this."
]);
});
Route::get('/private', function (Request $request) {
return response()->json([
"conference" => "Welcome to Laravel Live IN.",
"token" => "required",
"message" => "You need to have a valid Access Token to see this."
]);
})->middleware('jwt');