From f6afd0a79ea9ca0605685c6fc37372bf5bfb905e Mon Sep 17 00:00:00 2001 From: mahdihty Date: Sat, 6 Mar 2021 17:56:51 +0330 Subject: [PATCH 1/3] fix estimated time --- app/Models/Task.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Task.php b/app/Models/Task.php index ffef4f7..aee207b 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -73,7 +73,7 @@ class Task extends Model 'title' => 'required|string|min:3|max:254', 'description' => 'nullable|string|min:2|max:1000', 'priority' => 'nullable|numeric|between:1,10', - 'estimated_time' => 'nullable|numeric|min:30', + 'estimated_time' => 'bail|nullable|numeric', 'due_date' => 'bail|nullable|date|date_format:Y-m-d|after_or_equal:'. ((request()->method() === 'POST') ? date('yy-m-d') : $this->created_at->toDateString()), 'tags' => 'nullable|array', From ce7b2e2aa433b5424c535a88c91588546232c043 Mon Sep 17 00:00:00 2001 From: mahdihty Date: Sat, 6 Mar 2021 18:02:53 +0330 Subject: [PATCH 2/3] fix tags --- app/Http/Resources/TaskResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Resources/TaskResource.php b/app/Http/Resources/TaskResource.php index eab56f3..94491fb 100644 --- a/app/Http/Resources/TaskResource.php +++ b/app/Http/Resources/TaskResource.php @@ -21,7 +21,7 @@ class TaskResource extends JsonResource } } - $resource['tags'] = $this->tags; + $resource['tags'] = $this->tags()->pluck('tag_id')->toArray(); $resource['works'] = $this->works; $resource['comments'] = $this->comments; From a02ec57ab0f3b499af778fcccf3dbc36482a4b76 Mon Sep 17 00:00:00 2001 From: mahdihty Date: Sat, 6 Mar 2021 18:28:57 +0330 Subject: [PATCH 3/3] change .env.example --- .env.example | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index d1f8a6a..fde9c84 100644 --- a/.env.example +++ b/.env.example @@ -25,8 +25,9 @@ SESSION_LIFETIME=120 MEMCACHED_HOST=127.0.0.1 -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null +REDIS_HOST=redis +REDIS_PASSWORD=root +REDIS_USER=root REDIS_PORT=6379 MAIL_MAILER=smtp