Browse Source

access creator only

pull/3/head
wahyu 1 year ago
parent
commit
937ae248cd
  1. 5
      app/Http/Controllers/ProjectController.php

5
app/Http/Controllers/ProjectController.php

@ -229,6 +229,7 @@ class ProjectController extends Controller
$dataBuilder = $this->setUpPayload($payload, 'm_proyek'); $dataBuilder = $this->setUpPayload($payload, 'm_proyek');
$builder = $dataBuilder['builder']; $builder = $dataBuilder['builder'];
$countBuilder = $dataBuilder['count']; $countBuilder = $dataBuilder['count'];
$builder->where("selfTable.created_by",$this->currentName);
$dataGet = $builder->get(); $dataGet = $builder->get();
$totalRecord = $countBuilder->count(); $totalRecord = $countBuilder->count();
@ -274,7 +275,9 @@ class ProjectController extends Controller
'created_by', 'created_by',
'updated_at', 'updated_at',
'updated_by' 'updated_by'
)->orderBy('id', 'desc')->get(); )->orderBy('id', 'desc')
->where("created_by",$this->currentName)
->get();
$countData = $data->count(); $countData = $data->count();
if(!$data) if(!$data)

Loading…
Cancel
Save