Skip to content

Instantly share code, notes, and snippets.

@Omranic
Last active July 14, 2016 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Omranic/566971e49c95c47057221b4a47cdcaf3 to your computer and use it in GitHub Desktop.
Save Omranic/566971e49c95c47057221b4a47cdcaf3 to your computer and use it in GitHub Desktop.
Rinvex Repository is a simple, intuitive, and smart implementation of Active Repository with extremely flexible & granular caching system for Laravel, used to abstract the data layer, making applications more flexible to maintain. https://github.com/rinvex/repository
<?php
namespace App\Repositories;
use Illuminate\Contracts\Container\Container;
use Rinvex\Repository\Repositories\EloquentRepository;
class UserRepository extends EloquentRepository
{
public function __construct(Container $container)
{
$this->setContainer($container)
->setModel(\App\User::class)
->setRepositoryId('rinvex.repository.user');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment