Fix bug: Mark Completed should be shown to loggged in user only

This commit is contained in:
Thuan Bui
2025-03-06 22:57:54 +09:00
parent da2c4eeb6d
commit 0f9237c7a1
2 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ class TaskController extends Controller
public function index() {
$totalTasks = Task::count(); // Count all tasks
$completedTasks = Task::where('completed', true)->count(); // Coun
$tasks = Task::latest('updated_at')->Paginate(20);
$tasks = Task::latest()->Paginate(20);
return view('task.index', compact('tasks','totalTasks','completedTasks'));
}