toArray(app()->get(PKPRequest::class)); } public function getResource(): mixed { return $this->resource; } public function getCreatedAt(): string { if (!isset($this->getResource()->created_at)) { return '-'; } return $this->formatDate($this->getResource()->created_at); } public function getReservedAt(): string { if (!isset($this->getResource()->reserved_at)) { return '-'; } return $this->formatDate($this->getResource()->reserved_at); } public function getAvailableAt(): string { if (!isset($this->getResource()->available_at)) { return '-'; } return $this->formatDate($this->getResource()->available_at); } public function getFailedAt(): string { if (!isset($this->getResource()->failed_at)) { return '-'; } return $this->formatDate($this->getResource()->failed_at); } public function getJobName(): ?string { if (!isset($this->getResource()->payload)) { return '-'; } return $this->getResource()->payload['displayName'] ?? '-'; } protected function formatDate(Carbon $date): string { return $date->format($this->dateFormat); } }