Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morilog/flexible-repository
Reposiotry Pattern implemention for PHP (inc: Laravel, Symfony, ...)
https://github.com/morilog/flexible-repository
ddd doctrine eloquent eloquent-orm-models laravel php repository-pattern symfony
Last synced: 16 days ago
JSON representation
Reposiotry Pattern implemention for PHP (inc: Laravel, Symfony, ...)
- Host: GitHub
- URL: https://github.com/morilog/flexible-repository
- Owner: morilog
- License: mit
- Created: 2016-11-09T10:58:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T18:19:20.000Z (over 7 years ago)
- Last Synced: 2024-03-14T22:09:00.968Z (8 months ago)
- Topics: ddd, doctrine, eloquent, eloquent-orm-models, laravel, php, repository-pattern, symfony
- Language: PHP
- Homepage: http://morilog.ir
- Size: 17.6 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Flexible Repository
A Laravel package for creating Flexible and powerful repositories## Installation
```shell
composer require morilog/flexible-repository
```## Usage
### Create Repositories
#### Create for Eloquent
- Create an `interface` for your repository that extended from `Morilog\FlexibleRepository\Contracts\RepositoryInterface````php
app->bind(UserRepository::class, function ($app) {
return new EloquentUserRepository($app);
});
// or
// $this->app->bind(UserRepository::class, EloquentUserRepository::class);
}
}
```- Inject your repository in classes and controller methods
```php
all();
}
}```