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
+14
View File
@@ -1,6 +1,20 @@
<?php
use Watson\Validating\ValidatingTrait;
class Incident extends Eloquent implements Dingo\Api\Transformer\TransformableInterface {
use ValidatingTrait;
use \Illuminate\Database\Eloquent\SoftDeletingTrait;
protected $rules = [
'component' => 'required|integer',
'name' => 'required',
'status' => 'required|integer',
'message' => 'required',
];
protected $fillable = ['component', 'name', 'status', 'message'];
/**
* An incident belongs to a component.
* @return Illuminate\Database\Eloquent\Relations\BelongsTo