Download the PHP package luongnd/laravel-medialibrary-mongodb without Composer
On this page you can find all versions of the php package luongnd/laravel-medialibrary-mongodb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download luongnd/laravel-medialibrary-mongodb
More information about luongnd/laravel-medialibrary-mongodb
Files in luongnd/laravel-medialibrary-mongodb
Package laravel-medialibrary-mongodb
Short Description Associate files with Eloquent models
License MIT
Homepage https://github.com/spatie/laravel-medialibrary
Informations about the package laravel-medialibrary-mongodb
Associate files with Eloquent models
This Laravel >=5.1 and Lumen compatible package can associate all sorts of files with Eloquent models. It provides a simple API to work with. Here's an example:
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.
Documentation
You'll find the documentation on https://docs.spatie.be/laravel-medialibrary/v4.
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
To create derived images GD should be installed on your server. For the creation of thumbnails of svg's or pdf's you should also install Imagick.
Installation
You can install this package via composer using this command:
Next, you must install the service provider:
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:
And finally 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 defaultFilesystem
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.
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
Alternatives
About Spatie
Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-medialibrary-mongodb with dependencies
jenssegers/mongodb Version ^3.0.0
illuminate/bus Version ~5.1.16|~5.2.0
illuminate/console Version ~5.1.16|~5.2.0
illuminate/database Version ~5.1.16|~5.2.0
illuminate/support Version ~5.1.16|~5.2.0
spatie/laravel-glide Version ^3.0.0
spatie/pdf-to-image Version ^1.0.1
spatie/string Version ^2.0.0