laravel-database maintained by ablunier
Description
Laravel database utilities package. Repository, cache, abstraction layer.
Author
Last update
2017/05/23 07:31 (dev-master)
License
Downloads
3 753
Tags
Last update
2017/05/23 07:31
License
Require
- doctrine/dbal 2.5.*
- php >=5.5.9
- illuminate/support 5.4.*
- illuminate/database 5.4.*
Last update
2017/05/23 07:31
License
Require
- php >=5.5.9
- illuminate/support 5.4.*
- illuminate/database 5.4.*
- doctrine/dbal 2.5.*
Last update
2017/05/23 07:30
License
Require
- php >=5.5.9
- illuminate/support 5.4.*
- illuminate/database 5.4.*
- doctrine/dbal 2.5.*
Last update
2017/05/22 15:53
License
Require
- php >=5.5.9
- illuminate/support 5.4.*
- illuminate/database 5.4.*
- doctrine/dbal 2.5.*
Last update
2017/05/22 15:20
License
Require
- php >=5.5.9
- illuminate/support 5.4.*
- illuminate/database 5.4.*
- doctrine/dbal 2.5.*
Last update
2017/05/22 15:19
License
Require
- php >=5.5.9
- illuminate/support 5.4.*
- illuminate/database 5.4.*
- doctrine/dbal 2.5.*
Last update
2017/04/25 08:35
License
Require
- php >=5.5.9
- illuminate/support 5.2.*
- illuminate/database 5.2.*
- doctrine/dbal 2.5.*
Last update
2016/06/22 10:24
License
Require
- php >=5.5.9
- illuminate/support 5.2.*
- illuminate/database 5.2.*
- doctrine/dbal 2.5.*
Last update
2016/06/22 10:16
License
Require
- php >=5.5.9
- illuminate/support 5.1.*
- illuminate/database 5.1.*
- doctrine/dbal 2.5.*
Last update
2016/01/08 15:40
License
Require
- php >=5.5.9
- illuminate/support 5.1.*
- illuminate/database 5.1.*
- doctrine/dbal 2.5.*
Last update
2015/10/20 16:13
License
Require
- php >=5.4.0
- illuminate/support 5.1.*
- illuminate/database 5.1.*
- doctrine/dbal ~2.3
Last update
2015/10/09 09:06
License
Require
- php >=5.4.0
- illuminate/support 5.0.*
- illuminate/database 5.0.*
- doctrine/dbal ~2.3
Last update
2015/09/23 18:20
License
Require
- php >=5.4.0
- illuminate/support 5.0.*
- illuminate/database 5.0.*
Last update
2015/09/20 23:20
License
Require
- php >=5.4.0
- illuminate/support 5.0.*
- illuminate/database 5.0.*
Last update
2015/09/20 18:38
License
Require
- php >=5.4.0
- illuminate/support 5.0.*
- illuminate/database 5.0.*
Last update
2015/09/20 18:16
License
Require
- php >=5.4.0
- illuminate/support 5.0.*
- illuminate/database 5.0.*
Last update
2015/09/20 17:54
License
Require
- php >=5.4.0
- illuminate/support 5.0.*
- illuminate/database 5.0.*
Last update
2015/07/10 10:30
License
Require
- php >=5.4.0
- illuminate/support 5.0.*
- illuminate/database 5.0.*
comments powered by Disqus
Laravel Database
This package provides some utilities and patterns to work with Laravel databases
Note: This package is in active development and NOT ready for production.
Features
- Automatic default and extendable repository pattern.
- Cache system over repository pattern.
- Model abstraction layer.
Requirements
- PHP 5.5 or higher.
- Laravel 5.
Installation
Require this package with composer:
composer require ablunier/laravel-database
After updating composer, add the ServiceProvider and Facade (optional) to the app.php config file:
// config/app.php
'providers' => [
'...',
Ablunier\Laravel\Database\Manager\ModelManagerServiceProvider::class,
];
'aliases' => [
'...',
'ModelManager' => Ablunier\Laravel\Database\Manager\Facades\ModelManager::class,
];
Copy the package config to your local config with the publish command:
php artisan vendor:publish
Usage
Repository pattern
<?php
namespace App\Http\Controllers;
use ModelManager;
use View;
class ExampleController extends Controller
{
public function index()
{
$repo = ModelManager::getRepository('App\User');
$users = $repo->all();
View::make('users.index', [
'users' => $users
]);
}
}
<?php
namespace App\Http\Controllers;
use Ablunier\Laravel\Database\Contracts\Manager\ModelManager;
use View;
class ExampleController extends Controller
{
protected $mm;
public function __construct(ModelManager $mm)
{
$this->mm = $mm;
}
public function index()
{
$repo = $this->mm->getRepository('App\User');
$users = $repo->all();
View::make('users.index', [
'users' => $users
]);
}
}
Cache
Abstraction layer
Documentation
Visit the wiki for more information.
License
This software is published under the MIT License