Create components and incidents from the API

This commit is contained in:
manavo
2014-11-25 11:06:28 +00:00
parent 0c62f0534a
commit e104a9a317
6 changed files with 140 additions and 2 deletions
+11
View File
@@ -1,6 +1,17 @@
<?php
use Watson\Validating\ValidatingTrait;
class Component extends Eloquent implements Dingo\Api\Transformer\TransformableInterface {
use ValidatingTrait;
protected $rules = [
'name' => 'required',
'status' => 'required|integer'
];
protected $fillable = ['name', 'description', 'status'];
/**
* Lookup all of the incidents reported on the component.
* @return Illuminate\Database\Eloquent\Relations