Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erdiko/eloquent
Use the Eloquent ORM from Laravel in your Erdiko app
https://github.com/erdiko/eloquent
eloquent erdiko laravel orm
Last synced: about 2 months ago
JSON representation
Use the Eloquent ORM from Laravel in your Erdiko app
- Host: GitHub
- URL: https://github.com/erdiko/eloquent
- Owner: Erdiko
- License: mit
- Created: 2016-03-06T07:50:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-14T21:08:21.000Z (over 7 years ago)
- Last Synced: 2024-04-16T21:05:41.978Z (9 months ago)
- Topics: eloquent, erdiko, laravel, orm
- Language: PHP
- Homepage: http://erdiko.org/framework/databases/
- Size: 3.91 KB
- Stars: 6
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Eloquent
Use the Eloquent ORM from Laravel in your Erdiko appEloquent is a great ORM that uses the active record pattern.
You can use this to easily add Eleoquent to your erdiko app
To install via composer
composer require erdiko/eloquent
How to Use
----------In order to use Eloquent in your framework you can do one of the following
1. Require in the bootstrap file (/app/appstrap.php) and Eloquent is available on all pages/routes
```
require_once VENDOR.'/erdiko/eloquent/src/bootstrap.php';
```2. Lazy load Eloquent by having your models extend the erdiko\eloquent\Model class instead of the \Illuminate\Database\Eloquent\Model class
```
class Users extends erdiko\eloquent\Model { }
```3. Lazy load using traits; Create a base model and
```
class BaseModel extends \Illuminate\Database\Eloquent\Model {
use \erdiko\eloquent\EloquentTraits;
}
```Remember you only need to pick one scheme above, no need for all three. #2 is probably the most convenient.
Roadmap
-------Coming Soon
Read More
---------http://erdiko.org
https://laravel.com/docs/5.1/eloquent