๐ŸฌRepository

This package offers repository pattern to your project natively. You don't have to worry about the cache and filterable when using offered methods. If you wish to have your own method and implement cache then you should consider to use CacheManager.

// bind repo in service container
$this->app->singleton(
    abstract: UserRepositoryInterface::class,
    concrete: UserRepository::class
);

class UserRepository extends BaseRepository implements UserRepositoryInterface
{
    protected function setModel(): string
    {
        return User::class;
    }
}

interface UserRepositoryInterface extends BaseRepositoryInterface
{
}

Cache Manager

Last updated

Was this helpful?