PHPackages                             bedoke/model-repositories - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. bedoke/model-repositories

ActiveLibrary[File &amp; Storage](/categories/file-storage)

bedoke/model-repositories
=========================

Connect file repositories to your eloquent models

001PHP

Since Aug 6Pushed 6y agoCompare

[ Source](https://github.com/bedoke/model-repositories)[ Packagist](https://packagist.org/packages/bedoke/model-repositories)[ RSS](/packages/bedoke-model-repositories/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Description
===========

[](#description)

This package ensures that your models get their own storage directories.

Install
=======

[](#install)

Get the package
---------------

[](#get-the-package)

```
composer require bedoke/model-repositories

```

Extend the subjected model classes
----------------------------------

[](#extend-the-subjected-model-classes)

```
use bedoke\ModelRepositories\Traits\PublicRepository; // for public repositories
use bedoke\ModelRepositories\Traits\PrivateRepository; // for private repositories

```

All models can have both repository types!

Inside the model classes you have to use the traits.

```
use PublicRepository, PrivateRepository;

```

Migration
---------

[](#migration)

```
php artisan migrate

```

Usage
=====

[](#usage)

Functions
---------

[](#functions)

The private and public repository has almost all the storage functions that the Laravel Framework provides.

Example for the Laravel standard:

```
Storage::put($file, $content);

```

Example for this Model repositories package:

```
Auth::user()->privateRepository->put($file, $content);

```

Some functions must have different names due to the inheritance hierarchies. The following storage function calls have the following names via this repository package:

```
Storage::append()   -->     $repository->appendContent()
Storage::prepend()  -->     $repository->prependContent()
Storage::delete()   -->     $repository->remove()

```

Some functions (for example move() or rename()) are not implemented yet. Feel free to implement them and make a pull request.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d0e5db85cf64b4ee808db33ed9860256de132298f0e21b57d98f465b0c0a2f91?d=identicon)[bedoke](/maintainers/bedoke)

---

Top Contributors

[![bedoke](https://avatars.githubusercontent.com/u/14050253?v=4)](https://github.com/bedoke "bedoke (9 commits)")

---

Tags

laravellaravel-5-packagerepositorystorage

### Embed Badge

![Health badge](/badges/bedoke-model-repositories/health.svg)

```
[![Health](https://phpackages.com/badges/bedoke-model-repositories/health.svg)](https://phpackages.com/packages/bedoke-model-repositories)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M123](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
