Livewire Media Manager

Overview

Livewire Media Manager

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A TALL Stack Media Manager to upload media files to multiple storages or select image from Unsplash, URL

Installation

You can install the package via composer:

composer require phuclh/media-manager

Add Tailwind CSS classes in tailwind.config.js:

module.exports = {
    content: [
        ...
        './vendor/phuclh/media-manager/resources/views/**/*.blade.php',
    ]
};

You can publish the config file with:

php artisan vendor:publish --tag="media-manager-config"

This is the contents of the published config file:

return [
    'storage'    => [
        'disk' => 'public'
    ],

    'image' => [
        'allowed_file_types' => ['png', 'jpg', 'jpeg', 'gif'],

        /*
         * Max file size in KB.
         */
        'max_file_size'      => 5000,
    ],

    'unsplash' => [
        'access_key' => env('UNSPLASH_ACCESS_KEY'),

        'utm_source' => env('APP_NAME')
    ]
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="media-manager-views"

How to open Media Manager modal

Via Alpinejs

this.$wire.emitTo(
    'media-manager',
    'media-manager:show',
    {
        id: 'featured-image',
        file: null,
        metadata: null
    }
);

From Livewire Component

use Phuclh\MediaManager\WithMediaManager;

...

public function showUploader() 
{
    $this->showFileManager('featured-image', $file, $metadata);
}

You can pass file URL as 2nd parameter so the Media Manager will show that file by default.

Remove File from Media Manager

use Phuclh\MediaManager\WithMediaManager;

...

public function removeFeaturedImage() 
{
    $this->image = null;
    
    $this->removeFileFromMediaManager();
}

Events

File Selected

When a media file is selected, it will dispatch an event, called media-manager:file-selected

You can listen on that event by using AlpineJS like this:

x-on:media-manager:file-selected.window="setImage"

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

Comments
Releases(0.0.2)
Owner
null
Laravel Podcast Manager is a complete podcast manager package for Laravel 5.3+ that enables you to manage RSS feeds for your favorite podcasts and listen to the episodes in a seamless UI.

laravelpodcast | A Laravel podcast manager package - v0.0.8 Introduction Laravel Podcast Manager is a complete podcast manager package for Laravel 5.3

Jeremy Kenedy 22 Nov 4, 2022
Laragon MultiPHP per App + PECL Module + Extension manager + Ini Manager

LMPA Laragon MultiPHP per App This tools allow you to run multiple PHP version per app with Laragon, so you can have multiple site running different p

Gilbert Paquin 8 Oct 10, 2022
Oui player - Manage configurable media players in @Textpattern CMS

oui_player Introduction An extendable plugin to easily embed customized audio and video players. . This plugin does not use oembed, it builds iframe e

Nicolas Morand 3 Aug 15, 2018
LaraNx Seo enables your Laravel app to store SEO and social media meta tag data in database instead of your code

LaraNx Seo enables your Laravel app to store SEO and social media meta tag data in database instead of your code. Moving marketing data out of your code base and into your database where it is easily modified.

srg 13 Dec 29, 2022
Import data from and export data to a range of different file formats and media

Ddeboer Data Import library This library has been renamed to PortPHP and will be deprecated. Please use PortPHP instead. Introduction This PHP library

David de Boer 570 Dec 27, 2022
Proyecto Laravel-Livewire-Tailwind. Buscador de Gifs, Imágenes y Vídeos. Fuentes: Giphy y Pixabay.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Juan Gómez 1 Feb 10, 2022
PPM is a process manager, supercharger and load balancer for modern PHP applications.

PPM - PHP Process Manager PHP-PM is a process manager, supercharger and load balancer for PHP applications. It's based on ReactPHP and works best with

PPM - PHP Process Manager 6.5k Jan 3, 2023
Repman - PHP Repository Manager: packagist proxy and host for private packages

Repman - PHP Repository Manager Repman is a PHP repository manager. Main features: free and open source works as a proxy for packagist.org (speeds up

Repman 438 Jan 2, 2023
A next-generation package manager for the front-end

Duo is a next-generation package manager that blends the best ideas from Component, Browserify and Go to make organizing and writing front-end code qu

Duo 3.4k Dec 28, 2022
COP4331 Class Project 1 - "ConnectUs" virtual contact manager/Rolodex

ConnectUs COP4331 Class Project 1 - "ConnectUs" virtual contact manager/Rolodex Team Members Orion (Project Manager) Eric (Database) Rafael (API/Backe

Orion 3 Dec 9, 2022
Inventory manager - Light Bootstrap Dashboard

Light Bootstrap Dashboard is an admin dashboard template designed to be beautiful and simple. It is built on top of Bootstra

Ranaivonampoizina Mikajy 1 Nov 17, 2021
Very flexible git hook manager for php developers

CaptainHook CaptainHook is an easy to use and very flexible git hook library for php developers. It enables you to configure your git hook actions in

CaptainHook 812 Dec 30, 2022
Composer plugin for Repman - PHP Repository Manager

Repman Composer Plugin Composer plugin for Repman - PHP Repository Manager. Adds a mirror url for all your dependencies without need to update compose

Repman 9 Mar 14, 2022
Minimalistic bookmark manager for your own server written in PHP. Bookmarks are stored in a sqlite database.

b - Bookmark manager b is a minimalistic bookmark manager for your own server. Written in PHP. Bookmarks are stored in a sqlite database. Features: fi

Sebastian Volland 48 Jan 6, 2023
Your visual bookmark manager

Colllect Introduction Colllect is your new bookmark manager! With it, you can manage your inspiration and resources into colllections. Go to Colllect

Colllect 336 Jan 4, 2023
Google Tag Manager for Magento 2 with Advance Data Layer

Google Tag Manager is a user-friendly, yet powerful and cost-effective solution that is a must-have integration for every Magento store. It simplifies the process of adding and managing third-party JavaScript tags. With dozens of custom events and hundreds of data points our extensions the #1 GTM solution for Magento.

MagePal :: Magento Extensions 241 Dec 29, 2022
Composer Repository Manager for selling Magento 2 extension and offering composer installation for ordered packages.

Magento 2 Composer Repository Credits We got inspired by https://github.com/Genmato. Composer Repository for Magento 2 This extension works as a Magen

EAdesign 18 Dec 16, 2021
Composer registry manager that help to easily switch to the composer repository you want

CRM - Composer Registry Manager Composer Registry Manager can help you easily and quickly switch between different composer repositories. 简体中文 Install

Tao 500 Dec 29, 2022
Updates the disabled link manager functionality in WordPress, originally designed as a blogroll, to act as a bookmarking system.

=== Bookmark Links === Contributors: dshanske Tags: links, bookmarks, readlater Requires at least: 4.7 Tested up to: 5.4 Stable tag: trunk Requires PH

David Shanske 7 Nov 16, 2022