Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/livioribeiro/nettepropel2
Propel 2 integration with Nette Framework
https://github.com/livioribeiro/nettepropel2
Last synced: 12 days ago
JSON representation
Propel 2 integration with Nette Framework
- Host: GitHub
- URL: https://github.com/livioribeiro/nettepropel2
- Owner: livioribeiro
- License: bsd-3-clause
- Created: 2014-02-10T18:58:13.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-15T19:34:47.000Z (over 10 years ago)
- Last Synced: 2024-11-14T18:02:18.444Z (about 1 month ago)
- Language: PHP
- Size: 357 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
NettePropel2
============Propel 2 integration with Nette Framework
### Configuration
Can be used as compiler extension:
```php
extensions:
- NettePropel2\PropelExtension
```or calling `setup()` in bootstrap.php:
```php
use NettePropel2;
...
$container = $configurator->createContainer();
NettePropel2\Setup::setup($container)
```You can use both Neon or PHP to configure the database (If both are present, the php will be preferred).
In propel.local.php:
```php
$database = [
'default' => [
'adapter' => 'sqlite|pgsql|mysql|oracle|mssql',
'host' => 'host',
'dbname' => 'dbname',
'user' => 'user',
'password' => 'password'
]
];
```Or propel.local.neon:
```yaml
default:
adapter: sqlite|pgsql|mysql|oracle|mssql
host: host
dbname: dbname
user: user
password: password
```### Schema and shell
You schema.xml must be on app/schema directory.
To run propel commands (`model:build`, `migration:diff`, etc) use the `npropel` shell instead of `propel`. The `npropel` script will set the `--input-dir`, `--output-dir` and `--connection` parameters to your project.
```shell
ln -s vendor/bin/npropel propel
```