PHPackages                             dejwcake/craftable-media - 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. [Image &amp; Media](/categories/media)
4. /
5. dejwcake/craftable-media

ActiveLibrary[Image &amp; Media](/categories/media)

dejwcake/craftable-media
========================

Associate files with Eloquent models

2.0.0(1mo ago)0869↓41.7%2MITPHPPHP ^8.5CI passing

Since May 7Pushed 1mo agoCompare

[ Source](https://github.com/dejwCake/craftable-media)[ Packagist](https://packagist.org/packages/dejwcake/craftable-media)[ RSS](/packages/dejwcake-craftable-media/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (6)Dependencies (10)Versions (11)Used By (2)

Media
=====

[](#media)

This package adds media management capabilities to your Eloquent models. It builds on Spatie's `spatie/laravel-medialibrary` and adds:

- Collections definition – a fluent API for defining media collections, inspired by conversion definitions
- Auto-processing – saving an Eloquent model can automatically process and attach media collections from the request
- Authorization – control who has permission to attach specific media to specific models
- Private access – control who has permission to view specific media

Documentation
-------------

[](#documentation)

You can find full documentation at .

How to develop this project
---------------------------

[](#how-to-develop-this-project)

### Composer

[](#composer)

Update dependencies:

```
docker compose run -it --rm test composer update
```

Composer normalization:

```
docker compose run -it --rm php-qa composer normalize
```

### Run tests

[](#run-tests)

Run tests with pcov:

```
docker compose run -it --rm test ./vendor/bin/phpunit -d pcov.enabled=1
```

To regenerate snapshots use:

```
docker compose run -it --rm test ./vendor/bin/phpunit -d pcov.enabled=1 -d --update-snapshots
```

To switch between postgresql and mariadb change in `docker-compose.yml` DB\_CONNECTION environmental variable:

```
- DB_CONNECTION: pgsql
+ DB_CONNECTION: mysql

```

### Run code analysis tools (php-qa)

[](#run-code-analysis-tools-php-qa)

PHP compatibility:

```
docker compose run -it --rm php-qa phpcs --standard=.phpcs.compatibility.xml --cache=.phpcs.cache
```

Code style:

```
docker compose run -it --rm php-qa phpcs -s --colors --extensions=php
```

Fix style issues:

```
docker compose run -it --rm php-qa phpcbf -s --colors --extensions=php
```

Static analysis (phpstan):

```
docker compose run -it --rm php-qa phpstan analyse --configuration=phpstan.neon
```

Mess detector (phpmd):

```
docker compose run -it --rm php-qa phpmd ./config,./lang,./routes,./src,./tests ansi phpmd.xml --suffixes php --baseline-file phpmd.baseline.xml
```

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance89

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~136 days

Recently: every ~25 days

Total

9

Last Release

57d ago

Major Versions

0.9.1 → 1.0.02025-02-24

v1.x-dev → 2.0.02026-04-28

PHP version history (3 changes)0.9.0PHP ^8.1

1.0.0PHP ^8.2

2.0.0PHP ^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/7587c47435caa968be9a652630c6c0c91abacb43dfa001b02cbe5b892672cd7e?d=identicon)[dejwCake](/maintainers/dejwCake)

---

Top Contributors

[![dejwCake](https://avatars.githubusercontent.com/u/22255647?v=4)](https://github.com/dejwCake "dejwCake (40 commits)")[![palypster](https://avatars.githubusercontent.com/u/2362237?v=4)](https://github.com/palypster "palypster (36 commits)")[![kratochvilam](https://avatars.githubusercontent.com/u/7222373?v=4)](https://github.com/kratochvilam "kratochvilam (11 commits)")[![strstensky](https://avatars.githubusercontent.com/u/39539367?v=4)](https://github.com/strstensky "strstensky (11 commits)")[![RichardDominik](https://avatars.githubusercontent.com/u/13850339?v=4)](https://github.com/RichardDominik "RichardDominik (8 commits)")[![rastik1584](https://avatars.githubusercontent.com/u/1572018?v=4)](https://github.com/rastik1584 "rastik1584 (1 commits)")

---

Tags

laravelimagesmediacmsmedialibrary

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/dejwcake-craftable-media/health.svg)

```
[![Health](https://phpackages.com/badges/dejwcake-craftable-media/health.svg)](https://phpackages.com/packages/dejwcake-craftable-media)
```

###  Alternatives

[okipa/laravel-medialibrary-ext

Extra features for spatie/laravel-medialibrary package.

1011.2k](/packages/okipa-laravel-medialibrary-ext)

PHPackages © 2026

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