Download the PHP package dees040/laravel-medialibrary without Composer
On this page you can find all versions of the php package dees040/laravel-medialibrary. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dees040/laravel-medialibrary
More information about dees040/laravel-medialibrary
Files in dees040/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 Laravel >=5.4 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.
Documentation
You'll find the documentation on https://docs.spatie.be/laravel-medialibrary/v5.
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.
Postcardware
You're free to use this package (it's MIT-licensed), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.
The best postcards will get published on the open source page on our website.
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
A big thank you to Nicolas Beauvais for helping out with the issues on this repo.
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 with dependencies
illuminate/bus Version ~5.5.0
illuminate/console Version ~5.5.0
illuminate/database Version ~5.5.0
illuminate/support Version ~5.5.0
illuminate/pipeline Version ~5.5.0
spatie/pdf-to-image Version ^1.2
spatie/image Version ^1.0.0
spatie/temporary-directory Version ^1.1