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.
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 [email protected], 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
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.
composer test
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 |
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.