@ -43,7 +43,7 @@ class StatisticController extends Controller
$this->addSystems($result, $task);
$this->addTags($result, $task, $tags[$task->id]);
$this->addTags($result, $task, $tags[$task->id] ?? []);
}
return $result;
@ -23,8 +23,10 @@ class CreateTagsTable extends Migration
});
Schema::create('tag_task', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('tag_id');
$table->unsignedBigInteger('task_id');
$table->timestamps();