Undefined variable when creating the form

When I try to create a form with <?= $this->Form->create($mealplan) ?>, I get the error message: Undefined variable: mealplan
So I try to declare mealplan in the controller with $this->set(‘mealplan’, $mealplan); but that also returns the error: Undefined variable: mealplan

In the MealplansTable I have this:
namespace App\Model\Table;

use Cake\ORM\Table;

class MealplansTable extends Table
    public function initialize(array $config): void
	 $this->hasMany('Users', [
            'foreignKey' => 'user_id',

How do I create my mealplan form?

I fixed this by baking my MealplansController like this: bin/cake bake controller mealplans

Baking everything is a great way to a) save time and b) learn what’s “expected” of the various classes.