implement a rest api on php using slim