towerhouse / Healthmeasures-Laravel by lube8uy

This library works as a laravel or lumen interface for the package towerhouse/healthmeasures.
2
1
4
Package Data
Maintainer Username: lube8uy
Maintainer Contact: lucia.figueroa@towerhousestudio.com (Lucia Figueroa)
Package Create Date: 2017-02-03
Package Last Update: 2017-02-12
Language: PHP
License: MIT
Last Refreshed: 2024-02-25 03:16:40
Package Statistics
Total Downloads: 2
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 4
Total Forks: 0
Total Open Issues: 0

Health Measures Laravel Provider

towerhousestudio

  • This is a laravel/lumen provider for the library https://github.com/towerhouse/Healthmeasures
  • The provider is on HealthmeasuresServiceProvider.php
  • It provides a healthmeasures-routes.php with the format of a REST/API
  • You can consult what each function does on HealthmeasuresController.php
  • Responses are formatted following the standard from http://jsonapi.org/

Tech

Health Measures only uses one library to work properly:

  • [towerhouse/healthmeasures] >= 1.3.*

Installation

  • composer require towerhouse/healthmeasures-laravel
  • Laravel: on the file config/app.php include
  • Lumen: on the file bootstrap/app.php include
$app->register(Healthmeasures\Laravel\HealthmeasuresServiceProvider::class);
  • The library generates pictures, create a folder healthmeasures under the public folder with write permissions, currently you're responsible for cleaning the folder. There isn´t other storage to use by the moment.

Example of use

Call a url as declared on healthmeasures-routes.php for instance, if (your vhost is called mbhealth-api.local) http://mbhealth-api.local/healthmeasures/measure and it will render all the measures from the database

Tests

There are unit tests for each action except for the upload files actions. I have not found a way to do them yet.

ToDos

Limit with query parameters the number of results (pagination)

Html report generation

  • Laravel: php artisan vendor:publish
  • Lumen or Laravel: create the folder resources/views/healthmeasures/ and copy by hand report.blade.php inside there. Then you are free to modify the view.

Lumen provider

During the implementation of this package I found some difficulties that I documented here: http://towerhousestudio.com/implement-a-lumen-provider