25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
803B

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Controllers;
  4. use App\ViewModels\HomeIndexViewModel;
  5. use Core\Controller;
  6. class HomeController extends Controller
  7. {
  8. public function index()
  9. {
  10. $model = new HomeIndexViewModel();
  11. $model->title = 'Campaign Tracker';
  12. $model->eyebrow = 'PHP MVC application';
  13. $model->message = 'Manage campaign types and their configurable attributes using a lightweight PHP MVC stack backed by SQL Server.';
  14. $model->routeExample = '/campaign-types';
  15. return $this->view('home.index', [
  16. 'model' => $model,
  17. 'pageTitle' => $model->title,
  18. ]);
  19. }
  20. public function user(string $id)
  21. {
  22. return $this->json([
  23. 'userId' => $id,
  24. ]);
  25. }
  26. }

Powered by TurnKey Linux.