Create components and incidents from the API
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user