Download the PHP package elegantly/filament-media-plugin without Composer

On this page you can find all versions of the php package elegantly/filament-media-plugin. 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 filament-media-plugin

Filament Elegantly Media Plugin

Installation

Install the plugin with Composer:

If you haven't already done so, you need to publish the migration to create the media table:

Run the migrations:

You must also prepare your Eloquent model for attaching media.

For more information, check out the documentation.

Form component

You may use the field in the same way as the original file upload field:

The media file upload supports all the customization options of the original file upload component.

Passing a collection

Optionally, you may pass a collection() allows you to group files into categories:

Configuring the storage disk and directory

By default, files will be uploaded publicly to your storage disk defined in the collection.

Alternatively, you can manually set the disk with the disk() method:

Reordering files

In addition to the behavior of the normal file upload, Elegantly's Media also allows users to reorder files.

To enable this behavior, use the reorderable() method:

You may now drag and drop files into order.

Adding metadata

You may pass in [metadata] when uploading files using the metadata() method:

Using conversions

You may also specify a conversion() to load the file from showing it in the form, if present:

Filtering media

It's possible to target a file upload component to only handle a certain subset of media in a collection. To do that, you can filter the media collection using the filterMediaUsing() method. This method accepts a function that receives the $media collection and manipulates it. You can use any collection method to filter it.

For example, you could scope the field to only handle media that has certain custom properties:

Using media for rich editor file attachments

You can use media to store file attachments in the rich editor. To do this, you must register a rich content attribute on your model, similar to how a media library collection is registered. You should call fileAttachmentProvider() on the attribute registration, passing in a ElegantlyMediaFileAttachmentProvider::make() object:

A media collection with the same name as the attribute (content in this example) will be used for the file attachments. The collection must not contain any other media apart from file attachments for that attribute, since Filament will clear any unused media from the collection when the model is saved. To customize the name of the collection, you can pass it to the collection() method of the provider:

Table column

To use the media library image column:

The media library image column supports all the customization options of the original image column.

Passing a collection

Optionally, you may pass a collection():

By default, only media without a collection (using the default collection) will be shown. If you want to show media from all collections, you can use the allCollections() method:

Using conversions

You may also specify a conversion() to load the file from showing it in the table, if present:

Filtering media

It's possible to target the column to only display a subset of media in a collection. To do that, you can filter the media collection using the filterMediaUsing() method. This method accepts a function that receives the $media collection and manipulates it. You can use any collection method to filter it.

For example, you could scope the column to only display media that has certain custom properties:

Infolist entry

To use the media library image entry:

The media library image entry supports all the customization options of the original image entry.

Passing a collection

Optionally, you may pass a collection():

By default, only media without a collection (using the default collection) will be shown. If you want to show media from all collections, you can use the allCollections() method:

Using conversions

You may also specify a conversion() to load the file from showing it in the infolist, if present:

Filtering media

It's possible to target the entry to only display a subset of media in a collection. To do that, you can filter the media collection using the filterMediaUsing() method. This method accepts a function that receives the $media collection and manipulates it. You can use any collection method to filter it.

For example, you could scope the entry to only display media that has certain custom properties:


All versions of filament-media-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/support Version self.version
elegantly/laravel-media Version ^4.0
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 elegantly/filament-media-plugin contains the following files

Loading the files please wait ....