| 1 | <?php |
||
| 11 | class TasksRequest extends Model |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Mass assign fields. |
||
| 15 | * |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $fillable = [ |
||
| 19 | 'requester', 'userid', 'type', 'status', |
||
| 20 | 'startdate', 'enddate', 'description']; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Hidden fields |
||
| 24 | * |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | protected $hidden = ['created_at', 'updated_at']; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * The database table used by the model. |
||
| 31 | * |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | protected $table = 'tasks_requests'; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * TASK -> USER REQUEST. TO DETERMOINE HO IS ASSIGNED |
||
| 38 | * |
||
| 39 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 40 | */ |
||
| 41 | public function assignee() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * TASK -> REQUESTER to see the data who request this tasks. |
||
| 48 | * |
||
| 49 | */ |
||
| 50 | public function requestUser() |
||
| 54 | } |
||
| 55 |