|
|
@ -8,6 +8,7 @@ use App\Models\ReportActivityMaterial; |
|
|
|
use Illuminate\Database\Eloquent\Model; |
|
|
|
use Illuminate\Database\Eloquent\Model; |
|
|
|
use Illuminate\Support\Arr; |
|
|
|
use Illuminate\Support\Arr; |
|
|
|
use Illuminate\Support\Facades\DB; |
|
|
|
use Illuminate\Support\Facades\DB; |
|
|
|
|
|
|
|
use Carbon\Carbon; |
|
|
|
|
|
|
|
|
|
|
|
class Activity extends Model |
|
|
|
class Activity extends Model |
|
|
|
{ |
|
|
|
{ |
|
|
@ -30,6 +31,22 @@ class Activity extends Model |
|
|
|
'jobs_done', 'assign_hr', 'assign_material', 'assign_tools' |
|
|
|
'jobs_done', 'assign_hr', 'assign_material', 'assign_tools' |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getStartDateAttribute($value) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return Carbon::createFromTimestamp(strtotime($value)) |
|
|
|
|
|
|
|
->timezone(env('APP_TIMEZONE')) |
|
|
|
|
|
|
|
->toDateTimeString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getEndDateAttribute($value) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return Carbon::createFromTimestamp(strtotime($value)) |
|
|
|
|
|
|
|
->timezone(env('APP_TIMEZONE')) |
|
|
|
|
|
|
|
->toDateTimeString(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static function boot() { |
|
|
|
public static function boot() { |
|
|
|
parent::boot(); |
|
|
|
parent::boot(); |
|
|
|
|
|
|
|
|
|
|
|