|
|
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Http\Request; |
|
|
|
|
use App\Models\ProjectToChecklistK3; |
|
|
|
|
use App\Models\ChecklistK3; |
|
|
|
|
|
|
|
|
|
class ProjectToChecklistK3Controller extends Controller |
|
|
|
|
{ |
|
|
|
@ -122,6 +123,12 @@ class ProjectToChecklistK3Controller extends Controller
|
|
|
|
|
$builder = $dataBuilder['builder']; |
|
|
|
|
$countBuilder = $dataBuilder['count']; |
|
|
|
|
$dataGet = $builder->get(); |
|
|
|
|
|
|
|
|
|
foreach($dataGet as $key => $value) { |
|
|
|
|
$checklist = ChecklistK3::where('id', $value->checklist_k3_id)->first(); |
|
|
|
|
$dataGet[$key]->checklist_k3_name = $checklist->name; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$totalRecord = $countBuilder->count(); |
|
|
|
|
return response()->json(['status'=>'success','code'=>200,'data'=>$dataGet, 'totalRecord'=>$totalRecord], 200); |
|
|
|
|
} |
|
|
|
|