Add ToggleComplete for TaskController

This commit is contained in:
Thuan Bui
2025-03-06 22:25:46 +09:00
parent 11826da4c9
commit da2c4eeb6d
5 changed files with 34 additions and 18 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ class Task extends Model
if (is_null($task->completed)) {
$task->completed = false; // Ensure completed is false when creating a new task
}
$task->user_id = Auth::id(); // Set user_id automatically
$task->user_id = Auth::id(); // Set user_id automatically
});
}