| 1 | <?php |
||
| 23 | trait RelationTrait |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * Returns the instance of the user in the project. |
||
| 27 | * |
||
| 28 | * @return Relations\BelongsTo |
||
| 29 | */ |
||
| 30 | 5 | public function user() |
|
| 31 | { |
||
| 32 | 5 | return $this->belongsTo('Tinyissue\Model\User', 'user_id')->orderBy('firstname', 'ASC'); |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Returns the instance of the message in the project. |
||
| 37 | * |
||
| 38 | * @return Relations\BelongsTo |
||
| 39 | */ |
||
| 40 | 5 | public function message() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * Returns the instance of the project. |
||
| 47 | * |
||
| 48 | * @return Relations\BelongsTo |
||
| 49 | */ |
||
| 50 | public function project() |
||
| 54 | |||
| 55 | abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null); |
||
| 56 | } |
||
| 57 |