Merge branch 'feature/office365' of bitbucket.org:studiotem/jandl-taskmanager-app into feature/office365

This commit is contained in:
Matej Glasnák committed 2024-11-19 12:06:23 +01:00
commit 07f4ec0679
2 files changed
+33 -1

No files matched your search

+2 -1
View File
@@ -10,12 +10,14 @@ class SubTaskResource extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
*
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
return [
'id' => $this->id,
'type' => $this->type,
'created_by' => $this->created_by,
'master_task' => $this->mastertask->title,
'master_task_description' => $this->mastertask->description,
@@ -36,6 +38,5 @@ class SubTaskResource extends JsonResource
'files' => AttachmentResource::collection($this->attachments->isNotEmpty() ? $this->attachments : $this->mastertask->attachments),
'color' => $this->mastertask->color,
];
}
}
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('sub_tasks', function (Blueprint $table) {
$table->string('type')->after('master_task_id')->default('sub_task');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('subtasks', function (Blueprint $table) {
//
});
}
};