Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Details
  2. Type: Error
  3. Message: Class 'appcontrollersHomeController' not found
  4. File: C:xampphtdocsslimappconfigdependencies.php
  5. Line: 13
  6.  
  7. app
  8. config
  9. routes.php
  10. dependencies.php
  11. controllers
  12. HomeController.php
  13. public
  14. index.php
  15. composer.json
  16.  
  17. "autoload": {
  18. "psr-4" : {
  19. "App\" : "app/"
  20. }
  21. }
  22.  
  23. <?php
  24. $container = $app->getContainer();
  25.  
  26. // controller
  27. $container['HomeController'] = function($container) {
  28. return new appcontrollersHomeController;
  29. };
  30.  
  31. <?php
  32.  
  33. $app->get('/', 'HomeController:index');
  34.  
  35. <?php
  36.  
  37. namespace AppControllers;
  38.  
  39. class HomeController
  40. {
  41. public function index()
  42. { ... }
  43. }
  44.  
  45. <?php
  46. require __DIR__ . '/../vendor/autoload.php';
  47. require __DIR__ . '/../app/config/settings.php';
  48. $app = new SlimApp(["settings" => $config]);
  49. require __DIR__ . '/../app/config/dependencies.php';
  50. require __DIR__ . '/../app/config/routes.php';
  51. $app->run();
  52.  
  53. "autoload": {
  54. "psr-4" : {
  55. "app\" : "app/"
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement