Service of type .. used in @var annotation at .. not found
Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
- zdeno
- Člen | 13
Zdravim,
Service of type Model\WayModel used in @var annotation at App\Presenters\WayPresenter::$model not found. Did you register it in configuration file?
config
services:
- App\Model\UserManager
- App\Forms\FormFactory
- App\Forms\SignInFormFactory
- App\Forms\SignUpFormFactory
wayModel: Model\WayModel
router: App\RouterFactory::createRouter
presenter:
<?php
/** @var \Model\WayModel @inject */
public $model;
?>
co mi kde chybí?
jak dostat model do Presenter pres @inject?
pokud model zavolam pomoci $this->model = new \Model\WayModel();
tak to jde.
diky