Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 8 hours ago
JSON representation

💡 Eloquent Bridge for Nette Framework

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\EloquentExtension

eloquent:
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();
}
}
```