middleware('auth'); } /** * Show the application dashboard. * * @return \Illuminate\Contracts\Support\Renderable */ public function index() { $data['isClockIn'] = true; $attendance = Attendance::where('employee_id', auth()->user()->employee_id)->whereDate('date', now())->first(); if ($attendance) { if ($attendance->type == 'clockout') { $data['isClockIn'] = false; } } return view('dashboard', $data); } public function employeeDashboard() { } }