Basic custom module installation error - "...Controller does not exist in ReflectionMethod" I was following this tutorial to create an most simple custom module.

I have created files inside /modules/elevator_search:



And in the /src/Controller I've placed:


The /modules/elevator_search/evelator_search.info.yml:

name: Elevator Search
description: Moduł wyszukiwarki wind
package: Custom
type: module
version: 1.0
core: 8.x


The /modules/elevator_search/evelator_search.module is empty.

The /modules/elevator_search/evelator_search.routing.yml:

elevator_search.content:
  path: '/elevator_search'
  defaults:
    _controller: 'Drupal\elevator_search\Controller\EvelatorController::content'
    _title: 'Hello world'
  requirements:
    _permission: 'access content'


The /modules/elevator_search/src/Controller/ElevatorController.php:

&lt;?php
/**
@file
Contains \Drupal\elevator_search\Controller\ElevatorController.
 */

namespace Drupal\elevator_search\Controller;

use Drupal\Core\Controller\ControllerBase;

class EvelatorController extends ControllerBase {
  public function content() {
      return array(
          //'#type' =&gt; 'markup',
          '#markup' =&gt; t('Hello world'),
        );
  }
};


It did show up under /admin/modules:


But when I try to install it I get an error:


  ReflectionException: Class Drupal\elevator_search\Controller\EvelatorController does not exist in ReflectionMethod->__construct() (line 123 of core/lib/Drupal/Core/Entity/EntityResolverManager.php).
Your class' name is "EvelatorController", the name of the php file of the class is "ElevatorController.php" - it is just a spelling problem