Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ging-dev/nette-eloquent
💡 Eloquent Bridge for Nette Framework
https://github.com/ging-dev/nette-eloquent
eloquent nette nette-extension
Last synced: 26 days ago
JSON representation
💡 Eloquent Bridge for Nette Framework
- Host: GitHub
- URL: https://github.com/ging-dev/nette-eloquent
- Owner: ging-dev
- License: mit
- Created: 2021-06-01T04:01:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-06T09:16:11.000Z (over 3 years ago)
- Last Synced: 2024-09-30T13:59:20.355Z (about 1 month ago)
- Topics: eloquent, nette, nette-extension
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nette-eloquent
Eloquent Bridge for Nette Framework[![StyleCI](https://github.styleci.io/repos/372696270/shield?branch=main)](https://github.styleci.io/repos/372696270?branch=main)
## Installation
```sh
composer require ging-dev/nette-eloquent
```## Configuration
```neon
extensions:
eloquent: Gingdev\NetteExtension\EloquentExtensioneloquent:
driver: sqlite
database: %appDir%/database.db
```## Example
```php
database = $database;
}public function actionDefault()
{
$this->database->getSchemaBuilder()->drop('users');
$this->database->getSchemaBuilder()->create('users', function ($table) {
$table->increments('id');
$table->string('name')->unique();
});
$this->database->table('users')->select('*')
->where('name', 'gingdev')
->get();
}
}
```