PHPackages                             yojnc/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. yojnc/moonshine-spatie-medialibrary

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

yojnc/moonshine-spatie-medialibrary
===================================

Spatie\\MediaLibrary field for MoonShine Laravel admin panel

v1.0.0(11mo ago)02MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since May 23Pushed 11mo agoCompare

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

READMEChangelog (1)DependenciesVersions (2)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.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

31

—

LowBetter than 68% of packages

Maintenance50

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.2% 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 ~0 days

Total

2

Last Release

355d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

phpspatielaraveleloquentimagesmediauploadgallerymoonshineviVisualIdeasSpatie MediaLibrarySpatie Laravel MediaLibrary

### Embed Badge

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

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

###  Alternatives

[visual-ideas/moonshine-spatie-medialibrary

Spatie\\MediaLibrary field for MoonShine Laravel admin panel

2014.1k](/packages/visual-ideas-moonshine-spatie-medialibrary)[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)
