cipemotion / medialibrary
A Laravel media library.
Installs: 25 221
Dependents: 0
Suggesters: 2
Security: 0
Stars: 5
Watchers: 3
Forks: 2
Open Issues: 1
Requires
- php: >=7.1
- cloudconvert/cloudconvert-php: ^2.2|^3.2
- guzzlehttp/guzzle: ^6.0|^7.0
- intervention/image: ^2.3
- laravel/framework: ^5.3|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- ramsey/uuid: ^3.5|^4.0
- statamic/stringy: ^2.8|^3.0
Requires (Dev)
- aws/aws-sdk-php: ^3.19
Suggests
- aws/aws-sdk-php: To use the S3PresignedUrlGenerator.
- dev-develop
- 2.1.1
- 2.1.0
- 2.0.3
- 2.0.2
- v2.0.1
- v2.0.0
- v1.21.0
- v1.20.0
- v1.19.1
- v1.19.0
- v1.18.0
- v1.17.0
- v1.16.0
- v1.15.3
- v1.15.2
- v1.15.1
- v1.15.0
- v1.14.0
- v1.13.0
- v1.12.1
- v1.12.0
- v1.11.0
- v1.10.2
- v1.10.1
- v1.10.0
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.0
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.0
- v1.5.8
- v1.5.7
- v1.5.6
- v1.5.5
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.12
- v1.4.11
- v1.4.10
- v1.4.9
- v1.4.8
- v1.4.7
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.2.0
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-master
This package is auto-updated.
Last update: 2024-12-19 11:17:12 UTC
README
A media library package making it easy to implement your own WordPress style media picker component.
This package depends on intervention/image
.
Configuration
Add the service providers to your providers array in app.php
.
CipeMotion\Medialibrary\ServiceProvider::class,
Intervention\Image\ImageServiceProvider::class
Optional: Add the intervention/image
Facade to the aliases array in app.php
.
'Image' => Intervention\Image\Facades\Image::class,
Publish the config file:
php artisan vendor:publish --provider="CipeMotion\Medialibrary\ServiceProvider" --tag="config"
Read through the config file and change what is needed.
Database
Publish the migrations file:
php artisan vendor:publish --provider="CipeMotion\Medialibrary\ServiceProvider" --tag="migrations"
Run the migrations:
php artisan migrate
Relations
On your owner model add:
public function files()
{
return $this->hasMany(\CipeMotion\Medialibrary\Entities\File::class, 'owner_id');
}
On your models add:
public function attachebles()
{
return $this->morphToMany(\CipeMotion\Medialibrary\Entities\File::class, 'attachable', 'medialibrary_attachable');
}