Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
public_html
/
app
/
Models
/
Filename :
Task.php
back
Copy
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\SoftDeletes; class Task extends Model { use SoftDeletes; protected $table = 'tasks'; protected $primaryKey = 'task_id'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'group_id', 'task_title', 'description', 'goal_id', 'task_sp', 'task_type', 'product_id', 'due_by', 'task_status', 'created_by', 'created_at', 'updated_at', 'deleted_at' ]; /** * The attributes that should be hidden for arrays. * * @var array */ protected $hidden = [ 'deleted_at' ]; /** * get Attached Reward. */ public function product(): HasOne { return $this->hasOne('App\Models\Product', 'product_id', 'product_id'); } public function goal(): HasOne { return $this->hasOne('App\Models\Goal', 'goal_id', 'goal_id'); } }