Download the PHP package actengage/media without Composer

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

Media

This package provides a unit tested API to manage different types of files which can be related to Eloquent models (many to many relationships). Each type of file can be associated to its own resource for additional processing and manipulation. For instance, images are processed with the Image resource and manipulated with Intervention Image. API's are provides for creating your own resources.

Features

Requirements

Getting Started

Install via Composer

Publish the config file

Optional, publish the migration files

Resource Factory

The resource factory provides a unified interface for creating a variety of resources. You can even create your own resource classes and register them in config/media.php. By default, there are two types of resources: Image and File. For instance, you could define an Audio or Video resource. Resources are processed in the order they are defined.

Resource Methods

Every resource share a set of standard methods. And each type of resource may define its own method. Methods are chainable.

Conditional Resource Methods

Sometimes you may not know what kind of resource you are creating. You can use the is() method to conditionally chain methods to a specific resource types. Use the key configuration in config/media.php for matching or fully qualified class name.

You may also need to check for true and false values before executing code on a resource. For these scenarios, you may use when() and not() methods to conditionally chain methods to the resource.

php use Actengage\Media\Facades\Resource;

$resource = Resource::request('image');

// Context allows you to give a simple string to assign from context to // resources. For example, if you want to notate a resource is an image. $resource->context('image');

// Meta data is a key/value store that is saved as JSON in the database. // Similar to context, but this allows you to associate custom meta data // with a resource instance. $resource->meta([ 'some_key' => 'Some value goes here.' ]);

// Meta can be also added using individual arguments. $resource->meta('another_key', 'Another key goes here.');

// Tags add an array of keys as context to a resource. $resource->tags(['a', 'b', 'c']);

// Tags can be added using individual arguments or an array. $resource->tags('d', 'e', 'f');



## Events

Similar to Eloquent events, `Resource` event handlers work the same way. There are two ways to bind events, globally to a `Resource` class, or on the instance of a resource. The difference is global event binding is handled for all resources, whereas the instance methods are only fired for that instance.

### Global Methods

### Instance Methods

## Query Scopes

The `Media` model provides some convenient scopes for searching.

## Mediable Trait

The `Mediable` trait is used to associate `Media` models to your custom models. `Media` models are related using `morphToMany` relationships.

*Document.php*

*Basic Usage*

## Plugins

Plugins are used to add additional functionality to resources not provided by the core API's. This is an example of the `ExtractImageColors` plugin that extracts the common colors from an image and stores them in the model. A plugin has instance methods which apply to the specific resource that is being manipulated. Or as event handlers.

A `Plugin` class can be used in one of two ways. The first way is to bind it statically to the resource it should be used with. The second way is by defining it in the `config/media.php` file. In the config, plugins can be bound to specific resources or globally for all resources.

*Static Binding*

*config/media.php*

*Plugins/ExtractImageColors.php*

All versions of media with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.0
intervention/image Version ^2.7
ksubileau/color-thief-php Version ^2.0
psr/http-message Version ^1.0
guzzlehttp/guzzle Version ^7.4
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 actengage/media contains the following files

Loading the files please wait ....