Get all incidents, get single incident, transformer for incidents
This commit is contained in:
+10
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user