Website π contributte.org | Contact π¨π»βπ» f3l1x.io | Twitter π¦ @contributte
examples.contributte.org/doctrine-skeleton/
This is a simple application with basic setup of Doctrine and Nette.
To test this application, follow these steps:
- Create a new project.
- Install dependencies.
- Setup configuration.
- Run the application.
You will need PHP 8.3+
and Composer and Git installed.
Install this application using Composer or Git.
Composer
Create project using composer.
composer create-project -s dev contributte/doctrine-skeleton acme
Git
git clone [email protected]:contributte/doctrine-skeleton.git acme
Now you have application installed. It's time to install dependencies.
cd acme
composer install
This application uses 2 databases PostgreSQL and MariaDB. You have to configure them in local.neon
.
This is how default configuration looks like.
parameters:
postgres:
driver: pdo_pgsql
host: 0.0.0.0
port: 5432
user: contributte
password: contributte
dbname: demopostgres
mariadb:
driver: mysqli
host: 0.0.0.0
port: 3306
user: contributte
password: contributte
dbname: demomariadb
The easiest way is to use php built-in web server.
# make dev
php -S 0.0.0.0:8000 -t www
Then visit http://localhost:8000 in your browser.
To setup this application properly, you have to execute migrations.
- For PostgreSQL database.
# run migrations
NETTE__MIGRATION__DB=postgres NETTE__MIGRATION__MANAGER=default bin/console migrations:migrate
# or generate new migration
#NETTE__MIGRATION__DB=postgres NETTE__MIGRATION__MANAGER=default bin/console migrations:diff
- For MariaDB database.
# run migrations
NETTE__MIGRATION__DB=mariadb NETTE__MIGRATION__MANAGER=second bin/console migrations:migrate
# or generate new migration
#NETTE__MIGRATION__DB=mariadb NETTE__MIGRATION__MANAGER=second bin/console migrations:diff
See how to contribute to this package.
This package is currently maintaining by these authors.
Consider to support contributte development team. Also thank you for using this project.