Skip to content

🎁 Nette and Doctrine project skeleton. Using Doctrine (@nettrine) and Contributte (@contributte) libraries by @f3l1x.

License

Notifications You must be signed in to change notification settings

contributte/doctrine-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

76 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Website πŸš€ contributte.org | Contact πŸ‘¨πŸ»β€πŸ’» f3l1x.io | Twitter 🐦 @contributte

examples.contributte.org/doctrine-skeleton/


Introduction

This is a simple application with basic setup of Doctrine and Nette.

To test this application, follow these steps:

  1. Create a new project.
  2. Install dependencies.
  3. Setup configuration.
  4. Run the application.

Installation

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 git@github.com:contributte/doctrine-skeleton.git acme

Now you have application installed. It's time to install dependencies.

cd acme
composer install

Configuration

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

Development

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.

Usage

To setup this application properly, you have to execute migrations.

  1. 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
  1. 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

Screenshots

Maintenance

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.