CMS Tutorial findBySlug not found

you dont miss anything its called using magic __call function

you can hint your IDE by adding docBlock before table class declaration:

/**
 * @method \Cake\ORM\Query findBySlug(string $slug)
 */