From 937ae248cdd9412fb85244830e7c4b390da20ed7 Mon Sep 17 00:00:00 2001 From: wahyu Date: Tue, 17 Oct 2023 19:31:17 +0700 Subject: [PATCH] access creator only --- app/Http/Controllers/ProjectController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index f5b921b..91fbb3d 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -229,6 +229,7 @@ class ProjectController extends Controller $dataBuilder = $this->setUpPayload($payload, 'm_proyek'); $builder = $dataBuilder['builder']; $countBuilder = $dataBuilder['count']; + $builder->where("selfTable.created_by",$this->currentName); $dataGet = $builder->get(); $totalRecord = $countBuilder->count(); @@ -274,7 +275,9 @@ class ProjectController extends Controller 'created_by', 'updated_at', 'updated_by' - )->orderBy('id', 'desc')->get(); + )->orderBy('id', 'desc') + ->where("created_by",$this->currentName) + ->get(); $countData = $data->count(); if(!$data)