Upgrade Guide

Media module


From v1 to v2

> Changelog

New blade directives

It isn't needed anymore to use the @include directives. Instead the menu module comes with its own directives, @mediaSingle and @mediaMultiple.

Learn all about those new directives on the updated documentation.

These directives can now also be used on the create views!

Media urls

AsgardCMS use to resolve URLs on its own, ie making a url to a specific location based off the selected driver (local, s3, etc.). Now that Laravel has this functionallity built in, we're levering that feature since 2.0.

To keep your URLs intact you will have to set your APP_URL in your .env file. As well as update the config/filesystem.php to add a URL parameter to the local driver. You can view an example of this file at this location.

From 1.22.0 to 1.23.0

events.php configuration file not needed

This file is not needed anymore.

From 1.21.0 to 1.22.0

New configuration file config/asgard.media.events.php

This new configuration file is needed for allowing to include linking media partials on the create views of your forms. It contains will contain arrow of events that the media module will hook into.

Create the file your self in the configuration folder with the following contents.

From 1.17.0 to 1.18.0

Queued jobs

The RefreshThumbnailCommand now uses a queued job as well as a previously queue closure in the FileService class was abstracted to a queued job.

This requires the presence of the abstract Job class in app/Jobs/Job.php.

From 1.16.0 to 1.17.0

Translations have been removed

All translations files were removed from the individual modules and moved to the Translation module. Therefore you will need to require the Translation module in your project. This can be done by running the following command in your project:

composer require asgardcms/translation-module

From 1.15.0 to 1.16.0

New filesystem configuration item

A new filesystem configuration item was added to the media module config file. By default it is set to the local file system.

After updating the media module, you can either set that new configuration key in the Config/asgard.media.config.php file as follows:

'filesystem' => 'local',

Or if you're running version 1.19 or higher of the media module, by running the following command:

php artisan vendor:publish --provider="Modules\Media\Providers\MediaServiceProvider" --force --tag="config"

Mobile Analytics