init project

This commit is contained in:
2026-05-25 11:08:52 +07:00
parent a388c619b5
commit 895fdd9b83
1437 changed files with 384844 additions and 27 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class HeadingItemResource 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 [
'sample_id' => $this->id,
'sample_type_id' => $this->sample_type_id,
'group_result' => $this->group_result,
'id' => $this->test_id,
'name_en' => $this->whenLoaded('test', function (){
return $this->test->name_en;
})
];
}
}