When trying to get the example running I get a server error.
[2022–10–22 00–24–59] ArgumentCountError: Too few arguments to function App\Presenters\HomepagePresenter::__construct(), 0 passed in /Users/sholland/Documents/WebDevelopment/nette-blog/temp/cache/nette.configurator/Container_4d778123ac.php on line 113 and exactly 1 expected in /Users/sholland/Documents/WebDevelopment/nette-blog/app/Presenters/HomepagePresenter.php:14 @ http://localhost:8000/ @@ exception–2022–10–22–00–08–020170c170.html
Seeing where that is I suspect I am not connecting to the database.
I have a MySQL server running.
parameters: database: dsn: 'mysql:host=127.0.0.1;dbname=quickstart' user: root password: password
Anyone running on a mac have success in getting the Blog Home Page example working?
- Marek Bartoš
- Nette Blogger | 823
If you added a new dependency to a service, you either have to delete /tem/cache/nette.configurator or have debug mode enabled (so container reloads automatically when service dependencies (constructor or inject properties/methods) change)
Last edited by Marek Bartoš (2022-10-22 00:51)