PHPackages                             visual-ideas/moonshine-spatie-medialibrary - 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. [Database &amp; ORM](/categories/database)
4. /
5. visual-ideas/moonshine-spatie-medialibrary

ActiveLibrary[Database &amp; ORM](/categories/database)

visual-ideas/moonshine-spatie-medialibrary
==========================================

Spatie\\MediaLibrary field for MoonShine Laravel admin panel

4.1.0(3mo ago)2014.1k—4.4%6[4 issues](https://github.com/visual-ideas/moonshine-spatie-medialibrary/issues)MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since Apr 8Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/visual-ideas/moonshine-spatie-medialibrary)[ Packagist](https://packagist.org/packages/visual-ideas/moonshine-spatie-medialibrary)[ Docs](https://moonshine.cutcode.dev/section/fields-spatie-medialibrary)[ RSS](/packages/visual-ideas-moonshine-spatie-medialibrary/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (10)DependenciesVersions (30)Used By (0)

Spatie\\MediaLibrary field for [MoonShine](https://moonshine-laravel.com) Laravel admin panel
=============================================================================================

[](#spatiemedialibrary-field-for-moonshine-laravel-admin-panel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9923664329333c823b13d86957cddb9f9a1949c100c740ac039aae1c1378b484/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76697375616c2d69646561732f6d6f6f6e7368696e652d7370617469652d6d656469616c6962726172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/visual-ideas/laravel-site-settings)[![Total Downloads](https://camo.githubusercontent.com/0e88aec30265535b9c552ff5467e815143d1cf091b8d0bc9da52cb25897f0e90/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76697375616c2d69646561732f6d6f6f6e7368696e652d7370617469652d6d656469616c6962726172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/visual-ideas/moonshine-spatie-medialibrary)

Compatibility
-------------

[](#compatibility)

MoonShineMoonshine Spatie MedialibraryCurrently supported&gt;= v1.52 and &lt; v2.0&lt;= v1.2.0no&gt;= v2.0&gt;= v2.0.1yes&gt;= v3.0&gt;= v3.0.0yes&gt;= v4.0&gt;= v4.0.0yesInstallation
------------

[](#installation)

The field is purposed for work with the [Laravel-MediaLibrary](https://github.com/spatie/laravel-medialibrary)package made by [Spatie](https://github.com/spatie/laravel-medialibrary) and extends default field [Image](https://moonshine-laravel.com/docs/section/fields-image)

```
composer require visual-ideas/moonshine-spatie-medialibrary
```

Before using the Spatie\\MediaLibrary field, make sure that:

- The spatie/laravel-medialibrary package is installed and configured
- The visual-ideas/moonshine-spatie-medialibrary package is installed
- The field passed to Spatie\\MediaLibrary is added as the name of the collection via `->addMediaCollection('Field')`

In the model:

```
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;

class ModelClass extends Model implements HasMedia
{
    use InteractsWithMedia;

    //...

    public function registerMediaCollections(): void
    {
        $this->addMediaCollection('cover');
    }

    //...
}
```

In the MoonShine:

```
use VI\MoonShineSpatieMediaLibrary\Fields\MediaLibrary;

//...

MediaLibrary::make('Cover', 'cover'),

//...
```

By default, the field works in a single image mode

```
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;

class ModelClass extends Model implements HasMedia
{
    use InteractsWithMedia;

    //...

    public function registerMediaCollections(): void
    {
        $this->addMediaCollection('cover')->singleFile();
    }

    //...
}
```

If you want to use a field to load multiple images, add the `->multiple()` method when declaring the field

```
use VI\MoonShineSpatieMediaLibrary\Fields\MediaLibrary;

//...

MediaLibrary::make('Gallery', 'gallery')->multiple(),

//...
```

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance74

Regular maintenance activity

Popularity37

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 52% 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.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~14 days

Total

29

Last Release

119d ago

Major Versions

2.2.1 → 3.0.02025-01-19

1.x-dev → 2.2.22025-01-23

2.x-dev → 3.0.12025-01-23

3.0.2 → 4.0.02025-11-24

3.x-dev → 4.0.22025-11-26

PHP version history (4 changes)0.0.0PHP ^8.0|^8.1|^8.2

2.0.1PHP ^8.1

1.x-devPHP ^8.0|^8.1|^8.2|^8.3|^8.4

2.2.2PHP ^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12836836?v=4)[AlexVenga](/maintainers/AlexVenga)[@alexvenga](https://github.com/alexvenga)

---

Top Contributors

[![alexvenga](https://avatars.githubusercontent.com/u/12836836?v=4)](https://github.com/alexvenga "alexvenga (26 commits)")[![lee-to](https://avatars.githubusercontent.com/u/1861327?v=4)](https://github.com/lee-to "lee-to (10 commits)")[![Ge1i0N](https://avatars.githubusercontent.com/u/6265043?v=4)](https://github.com/Ge1i0N "Ge1i0N (4 commits)")[![w33bvGL](https://avatars.githubusercontent.com/u/226748328?v=4)](https://github.com/w33bvGL "w33bvGL (4 commits)")[![DissNik](https://avatars.githubusercontent.com/u/12373059?v=4)](https://github.com/DissNik "DissNik (3 commits)")[![z-takaev](https://avatars.githubusercontent.com/u/104326716?v=4)](https://github.com/z-takaev "z-takaev (2 commits)")[![AbylayOmar](https://avatars.githubusercontent.com/u/34562475?v=4)](https://github.com/AbylayOmar "AbylayOmar (1 commits)")

---

Tags

eloquentgalleryimageslaravelmediamoonshinephpspatiespatie-laravel-medialibraryspatie-media-libraryuploadvivisualideasphpspatielaraveleloquentimagesmediauploadgallerymoonshineviVisualIdeasSpatie MediaLibrarySpatie Laravel MediaLibrary

### Embed Badge

![Health badge](/badges/visual-ideas-moonshine-spatie-medialibrary/health.svg)

```
[![Health](https://phpackages.com/badges/visual-ideas-moonshine-spatie-medialibrary/health.svg)](https://phpackages.com/packages/visual-ideas-moonshine-spatie-medialibrary)
```

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k37.7M472](/packages/spatie-laravel-medialibrary)[plank/laravel-mediable

A package for easily uploading and attaching media files to models with Laravel

8271.5M11](/packages/plank-laravel-mediable)[matchory/elasticsearch

The missing elasticsearch ORM for Laravel!

3059.0k](/packages/matchory-elasticsearch)[wayofdev/laravel-cycle-orm-adapter

🔥 A Laravel adapter for CycleORM, providing seamless integration of the Cycle DataMapper ORM for advanced database handling and object mapping in PHP applications.

3516.7k3](/packages/wayofdev-laravel-cycle-orm-adapter)[salehhashemi/laravel-repository

Implementing the repository pattern for Laravel projects.

2010.5k](/packages/salehhashemi-laravel-repository)

PHPackages © 2026

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