Get all incidents, get single incident, transformer for incidents

This commit is contained in:
manavo
2014-11-25 10:30:42 +00:00
parent a1844741bd
commit 683d3f2093
6 changed files with 47 additions and 4 deletions
+10 -1
View File
@@ -1,6 +1,6 @@
<?php
class Incident extends Eloquent {
class Incident extends Eloquent implements Dingo\Api\Transformer\TransformableInterface {
/**
* An incident belongs to a component.
* @return Illuminate\Database\Eloquent\Relations
@@ -29,4 +29,13 @@
case 4: return 'glyphicon-ok';
}
}
/**
* Get the transformer instance.
*
* @return IncidentTransformer
*/
public function getTransformer() {
return new IncidentTransformer();
}
}