Browse Source

Merge branch 'mahdi' of https://gitea.hooradev.ir/mahdihty/liwo into mohammad

remotes/origin/mohammad
Mohammad Akbari 4 years ago
parent
commit
e46c83feed
Signed by: akbarjimi GPG Key ID: 55726AEFECE5E683
  1. 5
      .env.example
  2. 2
      app/Http/Resources/TaskResource.php
  3. 2
      app/Models/Task.php

5
.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

2
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;

2
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',

Loading…
Cancel
Save