2017 © Pedro Peláez
 

library medialibrary

A Laravel media library.

image

cipemotion/medialibrary

A Laravel media library.

  • Friday, July 6, 2018
  • by stayallive
  • Repository
  • 1 Watchers
  • 2 Stars
  • 3,290 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 75 Versions
  • 4 % Grown

The README.md

CipeMotion Media Library

A media library package making it easy to implement your own WordPress style media picker component., (*1)

This package depends on intervention/image., (*2)

Configuration

Add the service providers to your providers array in app.php., (*3)

CipeMotion\Medialibrary\ServiceProvider::class,
Intervention\Image\ImageServiceProvider::class

Optional: Add the intervention/image Facade to the aliases array in app.php., (*4)

'Image' => Intervention\Image\Facades\Image::class,

Publish the config file:, (*5)

php artisan vendor:publish --provider="CipeMotion\Medialibrary\ServiceProvider" --tag="config"

Read through the config file and change what is needed., (*6)

Database

Publish the migrations file:, (*7)

php artisan vendor:publish --provider="CipeMotion\Medialibrary\ServiceProvider" --tag="migrations"

Run the migrations:, (*8)

php artisan migrate

Relations

On your owner model add:, (*9)

public function files()
{
    return $this->hasMany(\CipeMotion\Medialibrary\Entities\File::class, 'owner_id');
}

On your models add:, (*10)

public function attachebles()
{
    return $this->morphToMany(\CipeMotion\Medialibrary\Entities\File::class, 'attachable', 'medialibrary_attachable');
}

The Versions

28/05 2018
01/06 2017
23/10 2015
16/10 2015
16/10 2015
14/10 2015
01/10 2015
01/10 2015
01/10 2015
30/09 2015
30/09 2015
30/09 2015
30/09 2015
30/09 2015