Code Monkey home page Code Monkey logo

laravel-media-manager's Introduction

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 [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

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 [email protected] instead of using the issue tracker.

Credits

License

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.