承接 laravel-daddy/swift-media 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laravel-daddy/swift-media

最新稳定版本:1.0.0

Composer 安装命令:

composer require laravel-daddy/swift-media

包简介

Easy way to manage multimedia with polymorphic table

README 文档

README

Crafted with ♥️ by Laravel Daddy

Installation

To install the package, run the following command:

composer require laravel-daddy/swift-media
php artisan vendor:publish --tag=migrations

Upon installation, the package will automatically publish the necessary migrations and register the SwiftMediaServiceProvider.

Usage

All media are automatically cached to enhance the performance of your application. This ensures that accessing settings is efficient and optimized.

You can manage settings using either the facade or the helper method.

Using the Facade

use LaravelDaddy\SwiftSettings\Facade\SwiftSettingsFacade;

// will upload file and delete old file if exist
SwiftMedia::uploadFile($model_type= User::class, $model_id= 2, $attribute= 'profile', $file, $path= '/');
SwiftMedia::deleteFile($model_type= User::class, $model_id= 2, $attribute= 'profile');
SwiftMedia::getAllFiles();
SwiftMedia::getAllFilesPaginated($limit = 20);

Using the Helper Method

// will upload file and delete old file if exist
swift_media()->uploadFile($model_type= User::class, $model_id= 2, $attribute= 'profile', $file, $path= '/');
swift_media()->deleteFile($model_type= User::class, $model_id= 2, $attribute= 'profile');
swift_media()->getAllFiles();
swift_media()->getAllFilesPaginated($limit = 20);

Both approaches allow you to retrieve or update media efficiently, with all keys being cached for improved performance.

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固