Skip to content

A Laravel package that exposes an API for handling media manipulations, and a set of Vue components to act as the interface for said API

License

Notifications You must be signed in to change notification settings

plank/laravel-media-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Media Manager

⚠️ This package is not ready for public use ⚠️

This package builds upon Laravel-Mediable with an API implementing it, as well as adding a set of VueJS components that can be dropped anywhere on your site for an instant media manager.

Installation

You can install the package via composer:

composer require plank/media-manager

Since this package integrates tightly with Laravel-Mediable, you should publish that config file and migration.

php artisan vendor:publish --provider="Plank\Mediable\MediableServiceProvider"

Then install the media manager to compile with your Mix pipeline, as well as install front end dependencies and build assets

Note: This will install Vue@2.6, among other dependencies as well as append the appropriate directives to your webpack.mix.js file, making the Vue components accessible universally.

php artisan manager:install

Follow the prompts provided by the command, and once complete the media manager will be compiled along with your application any time you run npm run dev

Finally, You'll want to publish the config from the package for use in your project, as well as, optionally, the assets

php artisan vendor:publish --tag=manager-config [--tag=manager-assets]

Run the migrations to add the required tables to your database:

php artisan migrate

Usage

By default the main component is set to mount on an element with the id #media-manager. Simply create an element, say a <div> with this id, and link to the applications app.js and app.css files, and the component should render. For example your blade file might look something like this:

<head>
    <link href="{{ mix('css/app.css') }}">
</head>
<body>

<div class="app-container">
    <div></div>
    <div id="media-manager"></div>
</div>

<script src="{{ mix('js/app.js')}} "></script>

</body>

Note: The style sheets for this package include an "app container" class, for ease of use, but you don't need to use that.

Testing

composer test

Dependencies

The Vue components included with this package have a number of dependencies that to ease development. A huge thanks to their creators.

Name Function Credit
vue-dropzone Uploading Files Rowan Winsemius
vuedraggable Drag & Drop Folders and Files SortableJS
vue-i18n Translation strings via JSON Kazuya Kawaguchi

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email massimo@plankdesign.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

A Laravel package that exposes an API for handling media manipulations, and a set of Vue components to act as the interface for said API

Resources

License

Stars

Watchers

Forks

Packages

No packages published