Commit 1e054b2b by Azhan Hannan

fixing timesheet bug

parent c4cfdd81
...@@ -837,7 +837,7 @@ class FormController extends Controller ...@@ -837,7 +837,7 @@ class FormController extends Controller
$userId = Users::find(Auth::id()) $userId = Users::find(Auth::id())
->u_staffID; ->u_staffID;
$user = Staff_info::where('id', Auth::id()) $user = Staff_info::where('fk_users', Auth::id())
->with('penyokongpm') ->with('penyokongpm')
->first(); ->first();
// dd(data_get($user,'penyokong')); // dd(data_get($user,'penyokong'));
...@@ -1920,7 +1920,12 @@ class FormController extends Controller ...@@ -1920,7 +1920,12 @@ class FormController extends Controller
$userId = Users::find(Auth::id()) $userId = Users::find(Auth::id())
->u_staffID; ->u_staffID;
$staff = Staff_info::find(Auth::id()); // $staff = Staff_info::find(Auth::id());
$TblUser = Users::where('id', Auth::id())->first()->u_staffID;
$staff = Staff_info::where('staff_id', $TblUser)->first();
// dd($staff->fk_lkp_department); // dd($staff->fk_lkp_department);
$year = date('Y'); $year = date('Y');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment