A project management app derived from Mind-Vision-Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 line
1.1KB

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Controllers;
  4. use App\Repositories\ActivityRepository;
  5. use App\Repositories\ProjectRepository;
  6. use App\Repositories\TaskRepository;
  7. use Core\Controller;
  8. class HomeController extends Controller
  9. {
  10. public function index()
  11. {
  12. $projects = new ProjectRepository();
  13. $tasks = new TaskRepository();
  14. $activities = new ActivityRepository();
  15. return $this->view('home.index', [
  16. 'pageTitle' => 'Project Compass',
  17. 'summary' => $projects->dashboardSummary(),
  18. 'featuredProjects' => $projects->recent(5),
  19. 'dueSoon' => $tasks->dueSoon(6),
  20. 'overdue' => $tasks->overdue(4),
  21. 'activity' => $activities->recent(8),
  22. ]);
  23. }
  24. public function activity()
  25. {
  26. $activities = new ActivityRepository();
  27. $projects = new ProjectRepository();
  28. return $this->view('home.activity', [
  29. 'pageTitle' => 'Activity feed',
  30. 'activity' => $activities->recent(30),
  31. 'projects' => $projects->recent(8),
  32. ]);
  33. }
  34. }

Powered by TurnKey Linux.