⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.142
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
test2.webi.com.ng
/
app
/
Models
/
View File Name :
ProjectTask.php
hasOne('App\Models\User', 'id', 'assign_to'); } public function taskUser() { return $this->hasOne('App\Models\User', 'id', 'assign_to'); } public function project() { return $this->hasOne('App\Models\Project', 'id', 'project_id'); } public function users() { return User::whereIn('id',explode(',',$this->assign_to))->get(); } public function comments() { return $this->hasMany('App\Models\ProjectTaskComment', 'task_id', 'id')->orderBy('id', 'DESC'); } public function taskFiles() { return $this->hasMany('App\Models\ProjectTaskFile', 'task_id', 'id')->orderBy('id', 'DESC'); } public function taskCheckList() { return $this->hasMany('App\Models\ProjectTaskCheckList', 'task_id', 'id')->orderBy('id', 'DESC'); } public function taskCompleteCheckListCount() { return $this->hasMany('App\Models\ProjectTaskCheckList', 'task_id', 'id')->where('status', '=', '1')->count(); } public function taskTotalCheckListCount() { return $this->hasMany('App\Models\ProjectTaskCheckList', 'task_id', 'id')->count(); } public function milestone() { return $this->hasOne('App\Models\ProjectMilestone', 'id', 'milestone_id'); } public function milestones() { $data = $this->milestone_id ? ProjectMilestone::find($this->milestone_id) : null; return $data; } public function stages() { return $this->hasOne('App\Models\ProjectStage', 'id', 'stage'); } public function taskTimer() { return $this->hasMany('App\Models\ProjectTaskTimer', 'task_id', 'id'); } public function totalTime() { $hours = $minutes = 0; foreach($this->taskTimer as $timer) { $startTime = $timer->start_time; $endTime = $timer->end_time; $totalTime = strtotime($endTime) - strtotime($startTime); $minut = ($totalTime) / 60; $hours += (int)$minut / 60; $minutes += $minut % 60; } $totalTaskhours = ($hours > 1) ? (int)$hours . " hrs" . ' ' . (int)$minutes . " min" : "$minutes Minutes"; return $totalTaskhours; } public function taskTime($startTime, $endTime) { $totalTime = strtotime($endTime) - strtotime($startTime); $minut = ($totalTime) / 60; $hours = (int)$minut / 60; $minutes = $minut % 60; $totalTaskhours = ($hours > 1) ? (int)$hours . " hrs" . ' ' . (int)$minutes . " min" : "$minutes Minutes"; return $totalTaskhours; } }