| 1 | <?php |
||
| 23 | trait RelationTrait |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * An attachment is belong to one issue (inverse relationship of Project\Issue::attachments). |
||
| 27 | * |
||
| 28 | * @return Relations\BelongsTo |
||
| 29 | */ |
||
| 30 | 1 | public function issue() |
|
| 31 | { |
||
| 32 | 1 | return $this->belongsTo('Tinyissue\Model\Project\Issue', 'issue_id'); |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * An attachment has one user upladed to (inverse relationship of User::attachments). |
||
| 37 | * |
||
| 38 | * @return Relations\BelongsTo |
||
| 39 | */ |
||
| 40 | public function user() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * An attachment can belong to a comment (inverse relationship of Comments::attachments). |
||
| 47 | * |
||
| 48 | * @return Relations\BelongsTo |
||
| 49 | */ |
||
| 50 | public function comment() |
||
| 54 | } |
||
| 55 |