thesold/laravel-media-manager

Laravel Media Manager,用于与 Vue Media Manager 一起使用

v1.1.3 2018-05-08 20:10 UTC

This package is auto-updated.

Last update: 2024-09-23 03:05:05 UTC


README

A Laravel companion package to work with thesold/vue-media-manager to provide a ready-made Media Manager interface with back-end.

Latest Version on Packagist

安装

composer require thesold/laravel-media-manager

This package uses auto-loading in Laravel 5.5

对于 Laravel 5.1 - 5.4,请加载 Service Provider 和 Facde。

// config/app.php

'providers' => [
    ...
    Thesold\LaravelMediaManager\MediaServiceProvider::class,
];

You are free to publish the laravelmediamanager.php config to customise the package, however we recommend using environment variables to specify required settings.

驱动

默认(文件)驱动

默认驱动使用 Intervention Image 库进行基本的缩放和裁剪。您可以自定义图片和上传文件夹。

# .env

LARAVELMEDIAMANAGER_DRIVER=default
LARAVELMEDIAMANAGER_FOLDER=media # The folder inside the public path where resized images are stored
LARAVELMEDIAMANAGER_UPLOAD_FOLDER=mediamanager # The upload folder within the storage directory where original images (uploads) are stored. These are not publicly accessible

Cloudinary 驱动

Cloudinary 是一个基于云的媒体库,提供优秀的图像优化和缩放功能,包括面部识别和焦点裁剪。使用此驱动器需要免费云存储账户。

# .env

LARAVELMEDIAMANAGER_DRIVER=cloudinary
LARAVELMEDIAMANAGER_CLOUD_NAME=cloudinary-cloud-name
LARAVELMEDIAMANAGER_API_KEY=cloudinary-api-key
LARAVELMEDIAMANAGER_API_SECRET=cloudinary-api-secret

使用

该包包含所有路由、中间件和控制器,以启用 Vue 媒体库。只需安装 thesold/vue-media-manager 并按照说明指定您的 Laravel Media Manager URL。

支持

如果您需要任何支持,请通过 Twitter 联系我或在存储库上打开一个问题。

许可证

GPL-3.0