public function currentYear() { $title = 'Current Year\'s Performance Analysis'; $totalTask = Task::myTask()->whereYear('deadline', '=', date('Y'))->count(); $completedTask = Task::myTask()->whereYear('deadline', '=', date('Y'))->whereStatus(1)->count(); return view('private.performance-analysis.index', compact('title', 'totalTask', 'completedTask')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $title = 'View All Task'; $tasks = Task::myTask()->latest()->paginate(10); return view('private.task.index', compact('title', 'tasks')); }