Model and Presenter linking error
Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
- dhosek
- Člen | 12
Hello community,
I got a following problem with a model and a pressenter. I've just created a
new file called „Hp.php“ in app\model folder. The file contains a namespace
and a class.
These lines are in the Presenter:
.....
use App\Model\Hp;
/**
* Homepage presenter.
*/
class HomepagePresenter extends BasePresenter
{
/** @var \App\Model\Hp @inject */
public $hp;
.....
and These lines are in config.neon:
....
services:
- App\Model\Hp
....
But the Tracy says an error:
Nette\DI\ServiceCreationException
Class App\Model\Hp used in service ‚26_App_Model_Hp‘ not found or is not
instantiable.
Thank you, regards Dan.