Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Well done!

You have completed Build a REST API with PHP!

Instruction

Review CUD routes

$app->group('/{course_id}/reviews', function () use ($app) { $app->get('', function ($request, $response, $args) { $result = $this->review->getReviewsByCourseId($args['course_id']); return $response->withJson($result, 200, JSON_PRETTY_PRINT); }); $app->get('/{review_id}', function ($request, $response, $args) { $resul...