<?php

use \Psr\Http\Message\ResponseInterface as Response;
use \Psr\Http\Message\ServerRequestInterface as Request;


$app->get('/{id}/getmyclassnotes', function (Request $request, Response $response, $args) {

    require __DIR__ . '/../../bootstrap.php';

    $id = addslashes(strip_tags(trim($args['id'])));

    $student = $entityManager->getRepository('Student')->getDetailsById($id);



    $data = $entityManager->getRepository('ClassNotes')->getMyClassNotes($student, $id);

    return $response->withJson($data, 200);
});


