Download the PHP package ambitionphp/laravel-medialibrary without Composer
On this page you can find all versions of the php package ambitionphp/laravel-medialibrary. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ambitionphp/laravel-medialibrary
More information about ambitionphp/laravel-medialibrary
Files in ambitionphp/laravel-medialibrary
Package laravel-medialibrary
Short Description Associate files with Eloquent models
License MIT
Homepage https://github.com/spatie/laravel-medialibrary
Informations about the package laravel-medialibrary
Associate files with Eloquent models
This package can associate all sorts of files with Eloquent models. It provides a simple API to work with. To learn all about it, head over to the extensive documentation.
Here are a few short examples of what you can do:
It can handle your uploads directly:
Want to store some large files on another filesystem? No problem:
The storage of the files is handled by Laravel's Filesystem, so you can use any filesystem you like. Additionally the package can create image manipulations on images and pdfs that have been added in the medialibrary.
Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Documentation
You'll find the documentation on https://docs.spatie.be/laravel-medialibrary/v7.
Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the media library? Feel free to create an issue on GitHub, we'll try to address it as soon as possible.
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
Requirements
Installation
You can install this package via composer using this command:
The package will automatically register itself.
You can publish the migration with:
After the migration has been published you can create the media-table by running the migrations:
You can publish the config-file with:
This is the contents of the published config file:
By default medialibrary will store it's files on Laravel's public
disk. If you want a dedicated disk you should add a disk to app/config/filesystems.php
. This would be a typical configuration:
All files of the medialibrary will be stored on that disk. If you are planning on working with the image manipulations you should configure a queue on your service with the name specified in the config file.
Lumen Support
Lumen configuration is slightly more involved but features and API are identical to Laravel.
Install using this command:
Uncomment the following lines in the bootstrap file:
Configure the laravel-medialibrary service provider (and AppServiceProvider
if not already enabled):
Update the AppServiceProvider
register method to bind the filesystem manager to the IOC container:
Manually copy the package config file to app\config\laravel-medialibrary.php
(you may need to
create the config directory if it does not already exist).
Copy the Laravel filesystem config file into app\config\filesystem.php
. You should add a disk configuration to the filesystem config matching the default_filesystem
specified in the laravel-medialibrary config file.
Finally, update boostrap/app.php
to load both config files:
Testing
You can run the tests with:
Upgrading
Please see UPGRADING for details.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Freek Van der Herten
- All Contributors
A big thank you to Nicolas Beauvais for helping out with the issues on this repo.
Alternatives
Support us
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-medialibrary with dependencies
ext-fileinfo Version *
illuminate/bus Version ~5.8.35|^6.0|^7.0
illuminate/console Version ~5.8.35|^6.0|^7.0
illuminate/database Version ~5.8.35|^6.0|^7.0
illuminate/pipeline Version ~5.8.35|^6.0|^7.0
illuminate/support Version ~5.8.35|^6.0|^7.0
league/flysystem Version ^1.0.8
maennchen/zipstream-php Version ^1.0
spatie/image Version ^1.4.0
spatie/pdf-to-image Version ^2.0
spatie/temporary-directory Version ^1.1
symfony/console Version ^4.4|^5.0
ext-json Version *