Download the PHP package backpack/medialibrary-uploaders without Composer

On this page you can find all versions of the php package backpack/medialibrary-uploaders. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package medialibrary-uploaders

Spatie Media Library Uploaders for Backpack CRUD fields & columns

Latest Version on Packagist Total Downloads The Whole Fruit Manifesto

If you project uses both Spatie Media Library and Backpack for Laravel, this add-on provides the ability for:

More exactly, it provides the ->withMedia() helper, that will handle the file upload and retrieval using Backpack Uploaders. You'll love how simple it makes uploads!

Requirements

Install and use spatie/laravel-medialibrary v10. If you haven't already, please make sure you've installed spatie/laravel-medialibrary and followed all installation steps in their docs:

Then prepare your Models to use spatie/laravel-medialibrary, by adding the InteractsWithMedia trait to your model and implement the HasMedia interface like explained on Media Library Documentation.

Installation

Just require this package using Composer, that's it:

Usage

On any field where you upload a file (eg. upload, upload_multiple, image or dropzone), add withMedia() to your field definition, in order to tell Backpack to store those uploaded files using Spatie's Laravel MediaLibrary. For example:

Advanced Use

Overriding the defaults

Backpack sets up some handy defaults for you when handling the media. But it also provides you a way to customize the bits you need from Spatie Media Library. You can pass a configuration array to ->withMedia([]) or 'withMedia' => [] to override the defaults Backpack has set.

Customizing the saving process (adding thumbnails, responsive images etc)

Inside the same configuration array mentioned above, you can use the whenSaving closure to customize the saving process. This closure will be called in THE MIDDLE of configuring the media collection. So AFTER calling the initializer function, but BEFORE calling toMediaCollection(). Do what you want to the $spatieMedia object, using Spatie's documented methods, then return it back to Backpack to call the termination method. Sounds good?

NOTE: Some methods will be called automatically by Backpack; You shoudn't call them inside the closure used for configuration: toMediaCollection(), setName(), usingName(), setOrder(), toMediaCollectionFromRemote() and toMediaLibrary(). They will throw an error if you manually try to call them in the closure.

Defining media collection in the model

You can also have the collection configured in your model as explained in Spatie Documentation, in that case, you just need to pass the collection configuration key. But you are still able to configure all the other options including the whenSaving callback.

Working with Conversions

Sometimes you will want to create conversions for your images, like thumbnails etc. In case you want to display some conversions instead of the original image on the field you should define displayConversions => 'conversion_name' or displayConversions => ['higher_priority_conversion', 'second_priority_conversion'].

In the end, if none of the conversions are ready yet (maybe they are still queued), we will display the original file as a fallback.

Custom properties

You can normally assign custom properties to your media with ->withCustomProperties([]) as stated in spatie documentation, but please be advise that name, repeatableContainerName and repeatableRow are reserved keywords and Backpack values will always overwrite yours.

Change log

Changes are documented here on Github. Please see the Releases tab.

Testing

Contributing

Please see contributing.md for a todolist and howtos.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

This project was released under MIT, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.


All versions of medialibrary-uploaders with dependencies

PHP Build Version
Package Version
Requires backpack/crud Version ^6.0
spatie/laravel-medialibrary Version ^10.7|^11.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package backpack/medialibrary-uploaders contains the following files

Loading the files please wait ....