From 85b32cb0eaa3ed46b15d05515bfd2601ce9d3ab9 Mon Sep 17 00:00:00 2001 From: JhumanJ Date: Tue, 1 Nov 2022 14:46:31 +0100 Subject: [PATCH] Fix last edited in formresource --- app/Http/Resources/FormResource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Resources/FormResource.php b/app/Http/Resources/FormResource.php index fe5e504..60dfcf6 100644 --- a/app/Http/Resources/FormResource.php +++ b/app/Http/Resources/FormResource.php @@ -45,8 +45,8 @@ class FormResource extends JsonResource 'visibility' => $this->visibility, 'notification_emails' => $this->notification_emails, 'slack_webhook_url' => $this->slack_webhook_url, - 'removed_properties' => $this->removed_properties, - 'last_edited_human' => $this->updated_at->diffForHumans() + 'removed_properties' => $this->removed_properties, + 'last_edited_human' => $this->updated_at?->diffForHumans() ] : []; $baseData = $this->getFilteredFormData(parent::toArray($request), $this->userIsFormOwner());